1
0
mirror of https://github.com/nu774/fdkaac.git synced 2025-06-05 23:29:14 +02:00

add ADTS header size(7) to output byte length

This commit is contained in:
nu774
2013-01-15 21:18:31 +09:00
parent f67cfe227e
commit d52b8bbf13

View File

@ -142,7 +142,7 @@ int aac_encode_frame(HANDLE_AACENCODER encoder,
unsigned channel_mode, obytes; unsigned channel_mode, obytes;
channel_mode = aacEncoder_GetParam(encoder, AACENC_CHANNELMODE); channel_mode = aacEncoder_GetParam(encoder, AACENC_CHANNELMODE);
obytes = 6144 / 8 * channel_mode; obytes = 6144 / 8 * channel_mode + 7;
if (!*output || *osize < obytes) { if (!*output || *osize < obytes) {
*osize = obytes; *osize = obytes;
*output = realloc(*output, obytes); *output = realloc(*output, obytes);