diff options
author | Måns Rullgård <mans@mansr.com> | 2010-01-11 18:02:00 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2010-01-11 18:02:00 +0000 |
commit | 7c8af53f871c3e32ee265fd84d7166cbcbcc0a35 (patch) | |
tree | 82af64d3589f7e31b31c756d858df5c3397b889b /libavcodec/aac.c | |
parent | 5d629b72cba60e1af4339b5646a9c1d511d892fb (diff) | |
download | ffmpeg-7c8af53f871c3e32ee265fd84d7166cbcbcc0a35.tar.gz |
AAC: escape_sequence is 21 bits max
The maximum length of escape_sequence is 21 bits, so adjust limit in
code to match this. Also fix the comment.
Originally committed as revision 21151 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aac.c')
-rw-r--r-- | libavcodec/aac.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/aac.c b/libavcodec/aac.c index 2bb05b85a2..d23d4da2c4 100644 --- a/libavcodec/aac.c +++ b/libavcodec/aac.c @@ -942,9 +942,9 @@ static int decode_spectrum_and_dequant(AACContext *ac, float coef[1024], if (vq_ptr[j] == 64.0f) { int n = 4; /* The total length of escape_sequence must be < 22 bits according - to the specification (i.e. max is 11111111110xxxxxxxxxx). */ - while (get_bits1(gb) && n < 15) n++; - if (n == 15) { + to the specification (i.e. max is 111111110xxxxxxxxxxxx). */ + while (get_bits1(gb) && n < 13) n++; + if (n == 13) { av_log(ac->avccontext, AV_LOG_ERROR, "error in spectral data, ESC overflow\n"); return -1; } |