[FFmpeg-user] AC3 decoding throws error number -16976906 ... vlc plays well

Mahesh Velankar mvelanka at gmail.com
Fri Dec 23 18:39:24 EET 2022

I did some research on this and downloaded ffmpeg and tried to find where
the error is getting thrown from.

Here is the file:

 76 int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr)
 77 {
 78     int frame_size_code;
 80     memset(hdr, 0, sizeof(*hdr));
 82     hdr->sync_word = get_bits(gbc, 16);
 83     if(hdr->sync_word != 0x0B77)
 84         return AAC_AC3_PARSE_ERROR_SYNC;

AAC_AC3_PARSE_ERROR_SYNC is 16976906 in decimal

How do I proceed from here?
How can I fix this? Should I fix the code or the audio stream file?
I feel, stream file should not be touched, because
1, it is coming from outside and not in my control and
2. VLC does not have any issue with that stream, then why should ffmpeg

So how can this code be fixed?
Please help me
Thank you

More information about the ffmpeg-user mailing list