[FFmpeg-cvslog] mpegvideo: check mpv return value
Vittorio Giovara
git at videolan.org
Tue Nov 11 21:24:00 CET 2014
ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Tue Nov 4 09:37:00 2014 -0500| [898e9a24ef13d8c56b4abf4ee0af09cdb0343e2d] | committer: Vittorio Giovara
mpegvideo: check mpv return value
CC: libav-stable at libav.org
Bug-Id: CID 1238786
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=898e9a24ef13d8c56b4abf4ee0af09cdb0343e2d
---
libavcodec/mpegvideo.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index c60389b..da9f24f 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -908,6 +908,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
// FIXME can parameters change on I-frames?
// in that case dst may need a reinit
if (!s->context_initialized) {
+ int err;
memcpy(s, s1, sizeof(MpegEncContext));
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;
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) {
More information about the ffmpeg-cvslog
mailing list