Fix the aacDecoder_DecodeFrame call in m4a-dec.c

On errors, this function clears the output buffer, and the buffer
size provided is in number of samples, not number of bytes.
This commit is contained in:
Martin Storsjo 2018-06-29 15:00:15 +03:00
parent d61932a908
commit f4da0776b4
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ int main(int argc, char *argv[]) {
fprintf(stderr, "Fill failed: %x\n", err);
break;
}
err = aacDecoder_DecodeFrame(handle, decode_buf, output_size, 0);
err = aacDecoder_DecodeFrame(handle, decode_buf, output_size / sizeof(INT_PCM), 0);
av_free_packet(&pkt);
if (err == AAC_DEC_NOT_ENOUGH_BITS)
continue;