diff options
author | Robert Swain <robert.swain@gmail.com> | 2008-09-18 16:02:51 +0000 |
---|---|---|
committer | Robert Swain <robert.swain@gmail.com> | 2008-09-18 16:02:51 +0000 |
commit | 341b28c0d274ade7902588697ec1d8bdfe449185 (patch) | |
tree | 6a3059a0c89b6601543a4a680bdb7890322ce31d /libavcodec/aac.c | |
parent | f80a8ca5cba5a86d2d3f3e314d41ad29a985ab5b (diff) | |
download | ffmpeg-streaming-341b28c0d274ade7902588697ec1d8bdfe449185.zip ffmpeg-streaming-341b28c0d274ade7902588697ec1d8bdfe449185.tar.gz |
Zero 'idx' for each iteration of the coupling gain loop and as it is only used
within this loop, we can move its declaration there too. This fixes bitstream
desync when decoding streams containing CCEs.
Based on a patch by Alex Converse (alex converse gmail com)
Originally committed as revision 15364 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aac.c')
-rw-r--r-- | libavcodec/aac.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/aac.c b/libavcodec/aac.c index d92ea98..eca6a9a 100644 --- a/libavcodec/aac.c +++ b/libavcodec/aac.c @@ -950,7 +950,7 @@ static int decode_cpe(AACContext * ac, GetBitContext * gb, int elem_id) { */ static int decode_cce(AACContext * ac, GetBitContext * gb, ChannelElement * che) { int num_gain = 0; - int c, g, sfb, ret, idx = 0; + int c, g, sfb, ret; int sign; float scale; SingleChannelElement * sce = &che->ch[0]; @@ -985,6 +985,7 @@ static int decode_cce(AACContext * ac, GetBitContext * gb, ChannelElement * che) return ret; for (c = 0; c < num_gain; c++) { + int idx = 0; int cge = 1; int gain = 0; float gain_cache = 1.; |