Merge pull request #30 from jcdr428/patch-3

Correct AAC frame size parsing
master
Dan 2019-11-24 20:00:59 +00:00 committed by GitHub
commit cedb3be7a5
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)