NAudio
NAudio copied to clipboard
Fixed issue reading a MP3 file that does not have a ID3v2 tag.
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.
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
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).