1
0
mirror of synced 2026-08-05 02:56:55 +00:00
Files
MohammadYusif 501c62c4a3 fix(id3v2): use ID3v2.3-specific frame-flag bit positions (#2647)
readFrameFlags applied the ID3v2.4 frame-flag bit layout to all ID3
versions. ID3v2.3 (status `%abc00000`, format `%ijk00000`) and ID3v2.4
(status `%0abc0000`, format `%0h00kmnp`) use different bit positions, and
the v2.4 format byte adds `unsynchronisation` (bit 1) and
`data_length_indicator` (bit 0) which do not exist as per-frame flags in
v2.3 (bits 0-4 are reserved there).

When a v2.3 frame left those reserved low bits set, the parser falsely
triggered data-length-indicator (stripping 4 bytes) and unsynchronisation
(removing bytes), corrupting the payload - e.g. an APIC frame decoded as
"e/jpeg" instead of "image/jpeg".

Pass majorVer into readFrameFlags and select the version-specific bit
mapping: the v2.3 branch reads tag/file/read-only from bits 7/6/5 and
compression/encryption/grouping from bits 7/6/5 of the format byte, with
unsynchronisation and data_length_indicator forced to false. Also corrects
the v2.4 grouping_identity bit (6 per spec, was 7).
2026-07-14 20:53:54 +02:00
..
2026-01-06 13:39:38 +01:00
2026-06-07 19:28:12 +02:00
2025-07-17 00:26:37 +02:00