id3: Identify ID3v2.2 and ID3v2.4 headers

Identify ID3v2.2 and ID3v2.4 headers. Previously only ID3v2.3 headers
were identified.
This commit is contained in:
Arthur Taylor 2021-01-03 15:32:59 -08:00
parent 39d8458904
commit b91c260346

View File

@ -2776,7 +2776,8 @@ guess_file_type (SF_PRIVATE *psf)
if (buffer [0] == MAKE_MARKER ('R', 'F', '6', '4') && buffer [2] == MAKE_MARKER ('W', 'A', 'V', 'E'))
return SF_FORMAT_RF64 ;
if (buffer [0] == MAKE_MARKER ('I', 'D', '3', 3))
if (buffer [0] == MAKE_MARKER ('I', 'D', '3', 2) || buffer [0] == MAKE_MARKER ('I', 'D', '3', 3)
|| buffer [0] == MAKE_MARKER ('I', 'D', '3', 4))
{ psf_log_printf (psf, "Found 'ID3' marker.\n") ;
if (id3_skip (psf))
return guess_file_type (psf) ;