[FFmpeg-cvslog] Avoid a null pointer dereference after oom on frame size change in mpegvideo.c.
Carl Eugen Hoyos
git at videolan.org
Mon Jul 1 00:26:36 CEST 2013
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sun Jun 30 23:45:37 2013 +0200| [712ef25116b4db6dcb84bef6e1517028bc103858] | committer: Carl Eugen Hoyos
Avoid a null pointer dereference after oom on frame size change in mpegvideo.c.
Fixes ticket #2735.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=712ef25116b4db6dcb84bef6e1517028bc103858
---
libavcodec/mpegvideo.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 6e5162b..0871489 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1223,7 +1223,8 @@ int ff_MPV_common_frame_size_change(MpegEncContext *s)
(s->mb_height * (i + 1) + nb_slices / 2) / nb_slices;
}
} else {
- if (init_duplicate_context(s) < 0)
+ err = init_duplicate_context(s);
+ if (err < 0)
goto fail;
s->start_mb_y = 0;
s->end_mb_y = s->mb_height;
More information about the ffmpeg-cvslog
mailing list