tag: id3v2: If a broken tag has 0 bytes payload, at least still skip the 10 byte header

Original commit message from CVS:
* gst-libs/gst/tag/id3v2.c: (id3demux_read_id3v2_tag):
If a broken tag has 0 bytes payload, at least still skip
the 10 byte header
This commit is contained in:
Jan Schmidt 2005-12-28 18:55:32 +00:00 committed by Tim-Philipp Müller
parent 83bffb642c
commit a2415c8edb

View file

@ -143,9 +143,12 @@ id3demux_read_id3v2_tag (GstBuffer * buffer, guint * id3v2_size,
/* Read the size from the header */ /* Read the size from the header */
read_size = read_synch_uint (data + 6, 4); read_size = read_synch_uint (data + 6, 4);
if (read_size == 0) { if (read_size == 0) {
/* Tag has no frames attached. Ignore it, but skip the header */
if (id3v2_size)
*id3v2_size = ID3V2_HDR_SIZE;
return ID3TAGS_BROKEN_TAG; return ID3TAGS_BROKEN_TAG;
} }
read_size += 10; read_size += ID3V2_HDR_SIZE;
/* Expand the read size to include a footer if there is one */ /* Expand the read size to include a footer if there is one */
if (flags & ID3V2_HDR_FLAG_FOOTER) { if (flags & ID3V2_HDR_FLAG_FOOTER) {