NAudio icon indicating copy to clipboard operation
NAudio copied to clipboard

Fixed issue reading a MP3 file that does not have a ID3v2 tag.

Open lmh9974a opened this issue 8 years ago • 2 comments

Hello,

I encountered an error when reading a MP3 file. The error was "Not an ID3v2 tag".

The MP3 files did not have a ID3v2 tag, just a ID3v1 tag. I removed the exception. The lib now reads the file without any problem.

lmh9974a avatar Nov 09 '17 16:11 lmh9974a

thanks for this contribution. I will need to test it against more MP3 files to ensure no regressions before merging this in. NAudio can already read files without ID3v2 tags, this seems to be a corrupt ID3v2 tag issue, or perhaps a false positive

markheath avatar Nov 18 '17 20:11 markheath

The thrown exception is caught here: https://github.com/naudio/NAudio/blob/a106da4eed61774e9bd3eda1fa7922581aee04e1/NAudio.Core/FileFormats/Mp3/Id3v2Tag.cs#L21-L31

I can confirm that mp3 files without ID3v2 tag do play (just that Visual Studio was catching the exception).

xPaw avatar Apr 19 '24 08:04 xPaw