diff options
author | Alex Converse <alex.converse@gmail.com> | 2008-09-12 14:32:49 +0000 |
---|---|---|
committer | Robert Swain <robert.swain@gmail.com> | 2008-09-12 14:32:49 +0000 |
commit | 516736477799ce406913e0165413c69c3019e96b (patch) | |
tree | 3063d46f3dde3719a78e473d84d811008146cce6 /libavcodec | |
parent | 0885770455c32180001b2ce05d181abe8deaf06d (diff) | |
download | ffmpeg-516736477799ce406913e0165413c69c3019e96b.tar.gz |
Only read some of TNS bitstream data in the case that the TNS filter order is
non-zero as per the specification.
Patch by Alex Converse (alex converse gmail com)
Fixes another issue pertaining to issue632
Originally committed as revision 15303 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/aac.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/aac.c b/libavcodec/aac.c index cc069ed7c6..18c2cbc6d9 100644 --- a/libavcodec/aac.c +++ b/libavcodec/aac.c @@ -629,6 +629,7 @@ static int decode_tns(AACContext * ac, TemporalNoiseShaping * tns, tns->order[w][filt] = 0; return -1; } + if (tns->order[w][filt]) { tns->direction[w][filt] = get_bits1(gb); coef_compress = get_bits1(gb); coef_len = coef_res + 3 - coef_compress; @@ -636,6 +637,7 @@ static int decode_tns(AACContext * ac, TemporalNoiseShaping * tns, for (i = 0; i < tns->order[w][filt]; i++) tns->coef[w][filt][i] = tns_tmp2_map[tmp2_idx][get_bits(gb, coef_len)]; + } } } } |