summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2013-06-30 23:45:37 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-06-30 23:45:37 +0200
commit712ef25116b4db6dcb84bef6e1517028bc103858 (patch)
tree8b2b227dc4e764161a74d85bcb561b3a4dd4f9b7 /libavcodec
parentf4aa8085f23c3abff3114d7bf638698d42110526 (diff)
Avoid a null pointer dereference after oom on frame size change in mpegvideo.c.
Fixes ticket #2735.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegvideo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 6e5162b1f8..0871489b34 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;