aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-13 23:48:00 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-14 00:08:44 +0200
commitf4d73f0fb55e0b5931c859ddb4d2d1617b60d560 (patch)
treee16e863d8ea8c6772a85f5c083d1b039eee47d97
parent8cda27b7537d15ef159cff94f3fe3dd7ab1330d4 (diff)
downloadffmpeg-f4d73f0fb55e0b5931c859ddb4d2d1617b60d560.tar.gz
mpegvideo: check return value of ff_MPV_common_init()
Fixes CID703621 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mpegvideo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index cc2bccac22..ad36ee47d8 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -530,6 +530,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
const AVCodecContext *src)
{
int i;
+ int err;
MpegEncContext *s = dst->priv_data, *s1 = src->priv_data;
if (dst == src)
@@ -547,12 +548,12 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
if (s1->context_initialized){
s->picture_range_start += MAX_PICTURE_COUNT;
s->picture_range_end += MAX_PICTURE_COUNT;
- ff_MPV_common_init(s);
+ if((err = ff_MPV_common_init(s)) < 0)
+ return err;
}
}
if (s->height != s1->height || s->width != s1->width || s->context_reinit) {
- int err;
s->context_reinit = 0;
s->height = s1->height;
s->width = s1->width;