From 018a6645bc606b545e6efdd980d9449c33e09b00 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Sun, 22 Jan 2012 01:40:10 +0100
Subject: [PATCH] aacenc: Fix bug in writing libavcodec_ident.

the written length was off by 2 causing aac decoders to fail with the data.
lucky the encoder was marked as experimental and not used much

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
 libavcodec/aacenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index f2a184c7f28..a7b3e4bdfa2 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -488,7 +488,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);
-- 
GitLab