ffmpeg | branch: master | James Almer <[email protected]> | Thu Sep 28 00:49:05 2017 -0300| [93dfc4f174d89ad4c9a76fb542ddfed138e4f01b] | committer: James Almer
avcodec/libopenh264dec: check for ff_set_dimensions() return value Was removed by accident in e9b6212de29a966f200833220ed35f51852f05f6. Signed-off-by: James Almer <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=93dfc4f174d89ad4c9a76fb542ddfed138e4f01b --- libavcodec/libopenh264dec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c index 4a27a5a0a6..d12e715117 100644 --- a/libavcodec/libopenh264dec.c +++ b/libavcodec/libopenh264dec.c @@ -92,7 +92,7 @@ static int svc_decode_frame(AVCodecContext *avctx, void *data, SVCContext *s = avctx->priv_data; SBufferInfo info = { 0 }; uint8_t* ptrs[3]; - int linesize[3]; + int ret, linesize[3]; AVFrame *avframe = data; DECODING_STATE state; @@ -106,7 +106,9 @@ static int svc_decode_frame(AVCodecContext *avctx, void *data, return avpkt->size; } - ff_set_dimensions(avctx, info.UsrData.sSystemBuffer.iWidth, info.UsrData.sSystemBuffer.iHeight); + ret = ff_set_dimensions(avctx, info.UsrData.sSystemBuffer.iWidth, info.UsrData.sSystemBuffer.iHeight); + if (ret < 0) + return ret; // The decoder doesn't (currently) support decoding into a user // provided buffer, so do a copy instead. if (ff_get_buffer(avctx, avframe, 0) < 0) { _______________________________________________ ffmpeg-cvslog mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
