diff options
author | Alex Converse <alex.converse@gmail.com> | 2009-02-09 01:39:33 +0000 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2009-02-09 01:39:33 +0000 |
commit | 00bbe27631ddce543e00d5fbdee445c39fc84d7f (patch) | |
tree | ca5a0ed6b9d63fd6fa2da46d19bae6e5c5ef1313 /libavcodec/vp3.c | |
parent | 16a59a7bb69399170b8060c4f9805362d9d31ab3 (diff) | |
download | ffmpeg-streaming-00bbe27631ddce543e00d5fbdee445c39fc84d7f.zip ffmpeg-streaming-00bbe27631ddce543e00d5fbdee445c39fc84d7f.tar.gz |
VP3: Do not ignore error from read_huffman_tree().
Originally committed as revision 17090 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vp3.c')
-rw-r--r-- | libavcodec/vp3.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index c44e6e4..277b11a 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -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); |