[FFmpeg-cvslog] avcodec/mpegvideo: Use "goto fail" for all error paths in ff_mpv_common_frame_size_change()

Michael Niedermayer git at videolan.org
Fri Nov 28 20:02:22 CET 2014


ffmpeg | branch: release/2.1 | Michael Niedermayer <michaelni at gmx.at> | Sun Sep  7 12:52:24 2014 +0200| [7644b292222c0adcbc49c5a20ebf5b10b8984c66] | committer: Michael Niedermayer

avcodec/mpegvideo: Use "goto fail" for all error paths in ff_mpv_common_frame_size_change()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 2762323c37511fbbc98b164c07620b9ebc59ec68)

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

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

 libavcodec/mpegvideo.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 84e32b4..f3c7ea5 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1214,7 +1214,7 @@ int ff_MPV_common_frame_size_change(MpegEncContext *s)
 
     if ((s->width || s->height) &&
         av_image_check_size(s->width, s->height, 0, s->avctx))
-        return AVERROR_INVALIDDATA;
+        goto fail;
 
     if ((err = init_context_frame(s)))
         goto fail;



More information about the ffmpeg-cvslog mailing list