[FFmpeg-cvslog] avcodec/mpegvideo: Set err on failure in ff_mpv_common_frame_size_change()

Michael Niedermayer git at videolan.org
Sat Sep 20 18:41:46 CEST 2014


ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Sun Sep  7 14:14:52 2014 +0200| [d19b55649c557911094369720df0e175b1594df2] | committer: Michael Niedermayer

avcodec/mpegvideo: Set err on failure in ff_mpv_common_frame_size_change()

Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit cfce6f7efd28130bf0dd409b2367ca0f8c9b2417)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d19b55649c557911094369720df0e175b1594df2
---

 libavcodec/mpegvideo.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 88af957..e283b98 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1400,7 +1400,7 @@ int ff_MPV_common_frame_size_change(MpegEncContext *s)
         s->mb_height = (s->height + 15) / 16;
 
     if ((s->width || s->height) &&
-        av_image_check_size(s->width, s->height, 0, s->avctx))
+        (err = av_image_check_size(s->width, s->height, 0, s->avctx)) < 0)
         goto fail;
 
     if ((err = init_context_frame(s)))
@@ -1417,7 +1417,7 @@ int ff_MPV_common_frame_size_change(MpegEncContext *s)
             }
 
             for (i = 0; i < nb_slices; i++) {
-                if (init_duplicate_context(s->thread_context[i]) < 0)
+                if ((err = init_duplicate_context(s->thread_context[i])) < 0)
                     goto fail;
                     s->thread_context[i]->start_mb_y =
                         (s->mb_height * (i) + nb_slices / 2) / nb_slices;



More information about the ffmpeg-cvslog mailing list