summaryrefslogtreecommitdiff
path: root/libavcodec/vc1dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-23 13:41:26 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-23 13:44:37 +0200
commit8b85d9bfb6f1b5a2bbdc732f0e20f65f2eddcaad (patch)
treef5b57f046a9499fe145c25b49346ea39dd062349 /libavcodec/vc1dec.c
parenteed40b29570b7ef5695ab2296cc634278d533c50 (diff)
parentb772b0e28eba6abf76d86ee8c6e459a86642db5a (diff)
Merge commit 'b772b0e28eba6abf76d86ee8c6e459a86642db5a'
* commit 'b772b0e28eba6abf76d86ee8c6e459a86642db5a': vc1dec: Undo mpegvideo initialization if unable to allocate tables Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vc1dec.c')
-rw-r--r--libavcodec/vc1dec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index d3a3616f3a..6b3627a93d 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5926,8 +5926,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;