aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-23 13:05:03 -0800
committerAlex Converse <alex.converse@gmail.com>2012-01-24 12:54:59 -0800
commitcdfe94c5ab1df40c6c724df5d4cafe2539c5571a (patch)
tree8c79885b18327b8150b160a9fa311b4625c5ad72
parentb8dd555c63ca4ef1034006159b01f49e103c6252 (diff)
downloadffmpeg-cdfe94c5ab1df40c6c724df5d4cafe2539c5571a.tar.gz
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@gmail.com>
-rw-r--r--libavcodec/aacenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 7607362142..b4045ab6eb 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);