Commit 91f10449 authored by Laurent Aimar's avatar Laurent Aimar Committed by Michael Niedermayer

vp6:Reset the internal state when aborting key frames header parsing in vp6 decoder.

It prevents leaving the state only half initialized.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 57764c69
......@@ -139,8 +139,11 @@ static int vp6_parse_header(VP56Context *s, const uint8_t *buf, int buf_size,
if (coeff_offset) {
buf += coeff_offset;
buf_size -= coeff_offset;
if (buf_size < 0)
if (buf_size < 0) {
if (s->framep[VP56_FRAME_CURRENT]->key_frame)
avcodec_set_dimensions(s->avctx, 0, 0);
return 0;
}
if (s->use_huffman) {
s->parse_coeff = vp6_parse_coeff_huffman;
init_get_bits(&s->gb, buf, buf_size<<3);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment