summaryrefslogtreecommitdiff
path: root/libavcodec/vp56.c
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-09-21 20:46:32 +0200
committerJanne Grunau <janne-libav@jannau.net>2011-10-07 00:27:03 +0200
commit066fff755a5d8edc660c010ddb08474d208eeade (patch)
tree4465eef0c8459a1ebd1cf3c854f00af4c4113ffd /libavcodec/vp56.c
parent0ec6d6e9b682318b5b5b5457e09fbf3c4ca41335 (diff)
vp6: Check for huffman tree build errors
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
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 530b890de1..e18c59ef66 100644
--- a/libavcodec/vp56.c
+++ b/libavcodec/vp56.c
@@ -541,7 +541,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;
@@ -605,6 +606,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])