From 3560ecddcf960a2df14c021dbe03728230e07b2d Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 11 Oct 2004 05:05:51 +0000 Subject: [PATCH] ext/mad/gstid3tag.c: reset v1 tag offset when there is no v1 tag. Fixes id3demux always consuming the last 128 bytes,... Original commit message from CVS: * ext/mad/gstid3tag.c: (gst_id3_tag_chain): reset v1 tag offset when there is no v1 tag. Fixes id3demux always consuming the last 128 bytes, even though it was valid mp3 data. --- ChangeLog | 6 ++++++ ext/mad/gstid3tag.c | 11 +++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9e96bee..ee495d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-10-11 Benjamin Otte + + * ext/mad/gstid3tag.c: (gst_id3_tag_chain): + reset v1 tag offset when there is no v1 tag. Fixes id3demux always + consuming the last 128 bytes, even though it was valid mp3 data. + 2004-10-10 Zaheer Abbas Merali * sys/v4l/gstv4lsrc.c: (gst_v4lsrc_palette_to_caps), diff --git a/ext/mad/gstid3tag.c b/ext/mad/gstid3tag.c index ca0673d..8bb100f 100644 --- a/ext/mad/gstid3tag.c +++ b/ext/mad/gstid3tag.c @@ -1082,11 +1082,14 @@ gst_id3_tag_chain (GstPad * pad, GstData * data) } else { GST_WARNING_OBJECT (tag, "detected ID3v1 tag, but couldn't parse it"); } - } else if (tag->v1tag_size != 0) { - GST_WARNING_OBJECT (tag, "bad non-ID3v1 tag at end of file"); } else { - GST_LOG_OBJECT (tag, "no ID3v1 tag (%" G_GUINT64_FORMAT ")", - GST_BUFFER_OFFSET (tag->buffer)); + if (tag->v1tag_size != 0) { + GST_WARNING_OBJECT (tag, "bad non-ID3v1 tag at end of file"); + } else { + GST_LOG_OBJECT (tag, "no ID3v1 tag (%" G_GUINT64_FORMAT ")", + GST_BUFFER_OFFSET (tag->buffer)); + tag->v1tag_offset = G_MAXUINT64; + } } gst_data_unref (GST_DATA (tag->buffer)); tag->buffer = NULL; -- 2.7.4