From b91c26034669f8e49c23e02cc8b0574e1d4cf7b6 Mon Sep 17 00:00:00 2001 From: Arthur Taylor Date: Sun, 3 Jan 2021 15:32:59 -0800 Subject: [PATCH] id3: Identify ID3v2.2 and ID3v2.4 headers Identify ID3v2.2 and ID3v2.4 headers. Previously only ID3v2.3 headers were identified. --- src/sndfile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sndfile.c b/src/sndfile.c index 3205d523..63beda8d 100644 --- a/src/sndfile.c +++ b/src/sndfile.c @@ -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) ;