Opened 8 months ago

Last modified 8 months ago

#11513 new defect

ffmpeg fails to decode MP2 and MP3 files

Reported by: Alan Wilkinson Owned by:
Priority: normal Component: avcodec
Version: unspecified Keywords: MP2, MP3 decoding
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by Alan Wilkinson)

Using your example decode_audio.c I've compiled it using Visual Studio 2022, version 17.13.3 (debug, x64) and FFmpeg V7.1 to created an EXE file. Leaving line 132 as original for MP2 files or changing it for MP3 files (i.e. AV_CODEC_ID_MP3) I've run the EXE on a number of MP2/MP3 files to create a WAV file, as follows:

decode_audio sample.mp3 sample.wav

I've got several "sample" MP2 and MP3 files that I've downloaded from Github plus several created using NCH Switch Sound File tool and decode_audio fails reading the source file with the following error;

[mp3float @ 0000022a16917600] Header missing
Error submitting the packet to the decoder

I'm currently developing an audio stream reader that reads AAC, AIF, AU, FLAC, M4A, MP4 and WAV files without any problems but fails on MP2 and MP3 files for the same reason cited above for your decode_audio.c example. As your example fails to read MP2 & MP3 files it gives me confidence that I'm not missing anything in my own development code.

I'm submitting this issue based upon your own example code which ought to make reproducing the issue somewhat easier.

Thanks for help resolving this problem

Change History (1)

comment:1 by Alan Wilkinson, 8 months ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.