From d6b32d8a1d792385220f09621c5f6545a327c709 Mon Sep 17 00:00:00 2001 From: Urs Fleisch Date: Sun, 9 Aug 2026 17:52:33 +0200 Subject: [PATCH] ID3: Accept iTunes ID3 frames with space padded ID3v2.2 ID (#1403) (#1404) iTunes 12 writes ID3v2.2 three-character sort frames (TSA, TSP, TST, TS2, TSC) inside ID3v2.3 tags, padded to four bytes with 0x20 (space) rather than 0x00, which is tolerated by '#ifndef NO_ITUNES_HACKS' code. Enhance that code to also tolerate padding with a space. --- taglib/mpeg/id3v2/id3v2framefactory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taglib/mpeg/id3v2/id3v2framefactory.cpp b/taglib/mpeg/id3v2/id3v2framefactory.cpp index 9d176003..662ab2bf 100644 --- a/taglib/mpeg/id3v2/id3v2framefactory.cpp +++ b/taglib/mpeg/id3v2/id3v2framefactory.cpp @@ -150,7 +150,7 @@ std::pair FrameFactory::prepareFrameHeader( } #ifndef NO_ITUNES_HACKS - if(version == 3 && frameID[3] == '\0') { + if(version == 3 && (frameID[3] == '\0' || frameID[3] == ' ')) { // iTunes v2.3 tags store v2.2 frames - convert now frameID = frameID.mid(0, 3); header->setFrameID(frameID);