1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

mpegvideo: check mpv return value

CC: libav-stable@libav.org
Bug-Id: CID 1238786
This commit is contained in:
Vittorio Giovara
2014-11-04 09:37:00 -05:00
parent fe27aeaeab
commit 898e9a24ef

View File

@@ -908,6 +908,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
// FIXME can parameters change on I-frames? // FIXME can parameters change on I-frames?
// in that case dst may need a reinit // in that case dst may need a reinit
if (!s->context_initialized) { if (!s->context_initialized) {
int err;
memcpy(s, s1, sizeof(MpegEncContext)); memcpy(s, s1, sizeof(MpegEncContext));
s->avctx = dst; s->avctx = dst;
@@ -915,7 +916,8 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
s->bitstream_buffer_size = s->allocated_bitstream_buffer_size = 0; s->bitstream_buffer_size = s->allocated_bitstream_buffer_size = 0;
ff_mpv_idct_init(s); ff_mpv_idct_init(s);
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) { if (s->height != s1->height || s->width != s1->width || s->context_reinit) {