Commit ea3cdc18 authored by alexc's avatar alexc

VP3: Do not ignore error from read_huffman_tree().


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17090 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent fb15e061
......@@ -2014,9 +2014,11 @@ static int read_huffman_tree(AVCodecContext *avctx, GetBitContext *gb)
}
s->huff_code_size++;
s->hbits <<= 1;
read_huffman_tree(avctx, gb);
if (read_huffman_tree(avctx, gb))
return -1;
s->hbits |= 1;
read_huffman_tree(avctx, gb);
if (read_huffman_tree(avctx, gb))
return -1;
s->hbits >>= 1;
s->huff_code_size--;
}
......@@ -2192,9 +2194,11 @@ static int theora_decode_tables(AVCodecContext *avctx, GetBitContext *gb)
s->huff_code_size = 1;
if (!get_bits1(gb)) {
s->hbits = 0;
read_huffman_tree(avctx, gb);
if(read_huffman_tree(avctx, gb))
return -1;
s->hbits = 1;
read_huffman_tree(avctx, gb);
if(read_huffman_tree(avctx, gb))
return -1;
}
}
......@@ -2250,7 +2254,8 @@ static int theora_decode_init(AVCodecContext *avctx)
// theora_decode_comments(avctx, gb);
break;
case 0x82:
theora_decode_tables(avctx, &gb);
if (theora_decode_tables(avctx, &gb))
return -1;
break;
default:
av_log(avctx, AV_LOG_ERROR, "Unknown Theora config packet: %d\n", ptype&~0x80);
......
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