From d52b8bbf13dc3e5a23342d0231873ce925136d2c Mon Sep 17 00:00:00 2001 From: nu774 Date: Tue, 15 Jan 2013 21:18:31 +0900 Subject: [PATCH] add ADTS header size(7) to output byte length --- src/aacenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aacenc.c b/src/aacenc.c index e622c62..65734ab 100644 --- a/src/aacenc.c +++ b/src/aacenc.c @@ -142,7 +142,7 @@ int aac_encode_frame(HANDLE_AACENCODER encoder, unsigned channel_mode, obytes; channel_mode = aacEncoder_GetParam(encoder, AACENC_CHANNELMODE); - obytes = 6144 / 8 * channel_mode; + obytes = 6144 / 8 * channel_mode + 7; if (!*output || *osize < obytes) { *osize = obytes; *output = realloc(*output, obytes); -- 2.30.2