[FFmpeg-cvslog] aacenc: Write correct length for long identification strings.

Michael Niedermayer git at videolan.org
Tue Jan 24 23:12:55 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jan 23 13:05:03 2012 -0800| [cdfe94c5ab1df40c6c724df5d4cafe2539c5571a] | committer: Alex Converse

aacenc: Write correct length for long identification strings.

When the length is the escape value (15), the new length is calculated by
15 + get_bits(8) - 1.

Signed-off-by: Alex Converse <alex.converse at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cdfe94c5ab1df40c6c724df5d4cafe2539c5571a
---

 libavcodec/aacenc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 7607362..b4045ab 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -462,7 +462,7 @@ static void put_bitstream_info(AVCodecContext *avctx, AACEncContext *s,
     put_bits(&s->pb, 3, TYPE_FIL);
     put_bits(&s->pb, 4, FFMIN(namelen, 15));
     if (namelen >= 15)
-        put_bits(&s->pb, 8, namelen - 16);
+        put_bits(&s->pb, 8, namelen - 14);
     put_bits(&s->pb, 4, 0); //extension type - filler
     padbits = 8 - (put_bits_count(&s->pb) & 7);
     avpriv_align_put_bits(&s->pb);



More information about the ffmpeg-cvslog mailing list