id3demux: fix parsing of unsync'ed ID3 v2.4 tags and frames
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 7 Aug 2009 15:02:23 +0000 (16:02 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 7 Aug 2009 15:02:23 +0000 (16:02 +0100)
commit2e05af387614b9850a9b0782e5ee1ab1a78362fd
tree12df5b19f19252916372f3223fa051e69a31c744
parentc42f0ad5b6aefd42a8336bd73d6e856fce306908
id3demux: fix parsing of unsync'ed ID3 v2.4 tags and frames

Reversing the unsynchronisation seems to work slightly differently
for ID3 v2.3 tags and v2.4 tags: v2.3 tags don't have syncsafe frame
sizes in the frame header, so the unsynchronisation is applied to
the whole frame data including all the frame headers. v2.4 frames
have sync-safe sizes, however, so the unsynchronisation only needs
to be applied to the actual frame data, and it seems that's what's
being done as well. So we need to undo the unsynchronisation on a
per-frame basis for v2.4 tags for things to work properly.

Fixes extraction of coverart/images from APIC frames in ID3 v2.4
tags (#588148).

Add unit test for this as well.
gst/id3demux/id3tags.c
gst/id3demux/id3tags.h
gst/id3demux/id3v2frames.c
tests/check/elements/id3demux.c
tests/files/Makefile.am
tests/files/id3-588148-unsynced-v24.tag [new file with mode: 0644]