summaryrefslogtreecommitdiff
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 00:42:28 +0200
commit7c249d4fbaf4431b20a90a3c942f3370c0039d9e (patch)
treeff9335781727dfa35d719990bde022fbed86a4ea /libavcodec/vp56.c
parentdba20b84784a7931b7eac50ced1d43e86801bde9 (diff)
Check for huffman tree building error in vp6 decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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 c3cfbe29f4..996eba0040 100644
--- a/libavcodec/vp56.c
+++ b/libavcodec/vp56.c
@@ -551,7 +551,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;
@@ -615,6 +616,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])