Correct AAC frame size parsing

master
jcdr428 2019-11-24 19:20:56 +02:00 committed by GitHub
parent 2c5c842dd7
commit fe0a66c2a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ uint8_t* AACCodec::findAacFrame(uint8_t* buffer, uint8_t* end)
int AACCodec::getFrameSize(uint8_t* buffer)
{
return buffer[4]*8 + (buffer[5] >> 5);
return ((buffer[3] & 0x03) << 11) + (buffer[4] << 3) + (buffer[5] >> 5);
}
bool AACCodec::decodeFrame(uint8_t* buffer, uint8_t* end)