aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vp56.c
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-09-21 20:46:32 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-09-22 01:19:27 +0200
commitcf43508eb39bb3749f45d84ded924e1b30794566 (patch)
tree62d43b4dee905cfe72ac142ec953711ce8c8021b /libavcodec/vp56.c
parentc9c6e5f4e8680b7b7801dd6943590ae9cd6bfd89 (diff)
downloadffmpeg-cf43508eb39bb3749f45d84ded924e1b30794566.tar.gz
Check for huffman tree building error in vp6 decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 7c249d4fbaf4431b20a90a3c942f3370c0039d9e)
Diffstat (limited to 'libavcodec/vp56.c')
-rw-r--r--libavcodec/vp56.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c
index 25ec7a376d..30f3efbc46 100644
--- a/libavcodec/vp56.c
+++ b/libavcodec/vp56.c
@@ -549,7 +549,8 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
s->mb_type = VP56_MB_INTER_NOVEC_PF;
}
- s->parse_coeff_models(s);
+ if (s->parse_coeff_models(s))
+ goto next;
memset(s->prev_dc, 0, sizeof(s->prev_dc));
s->prev_dc[1][VP56_FRAME_CURRENT] = 128;
@@ -613,6 +614,7 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
}
}
+ next:
if (p->key_frame || golden_frame) {
if (s->framep[VP56_FRAME_GOLDEN]->data[0] &&
s->framep[VP56_FRAME_GOLDEN] != s->framep[VP56_FRAME_GOLDEN2])