[FFmpeg-devel] [PATCH 1/3] aacenc: Fix bug in writing libavcodec_ident.

Michael Niedermayer michaelni at gmx.at
Sun Jan 22 04:35:45 CET 2012


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 at gmx.at>
---
 libavcodec/aacenc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index f2a184c..a7b3e4b 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);
-- 
1.7.5.4



More information about the ffmpeg-devel mailing list