[FFmpeg-cvslog] vc1dec: Undo mpegvideo initialization if unable to allocate tables
Martin Storsjö
git at videolan.org
Tue Oct 8 01:33:17 CEST 2013
ffmpeg | branch: release/1.1 | Martin Storsjö <martin at martin.st> | Fri Sep 20 11:16:57 2013 +0300| [a6a8f66608cce414ef31c01a3059d64f6ef26663] | committer: Luca Barbato
vc1dec: Undo mpegvideo initialization if unable to allocate tables
Previously, s->context_initialized was left set to 1
if ff_vc1_decode_init_alloc_tables failed, skipping the
initialization completely on the next decode call.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit b772b0e28eba6abf76d86ee8c6e459a86642db5a)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a6a8f66608cce414ef31c01a3059d64f6ef26663
---
libavcodec/vc1dec.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index cb90078..9d68d32 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5495,8 +5495,12 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
}
if (!s->context_initialized) {
- if (ff_msmpeg4_decode_init(avctx) < 0 || ff_vc1_decode_init_alloc_tables(v) < 0)
+ if (ff_msmpeg4_decode_init(avctx) < 0)
goto err;
+ if (ff_vc1_decode_init_alloc_tables(v) < 0) {
+ ff_MPV_common_end(s);
+ goto err;
+ }
s->low_delay = !avctx->has_b_frames || v->res_sprite;
More information about the ffmpeg-cvslog
mailing list