ext/mad/gstid3tag.c: try harder to check if an event is really a discont

Original commit message from CVS:
* ext/mad/gstid3tag.c: (gst_id3_tag_handle_event):
try harder to check if an event is really a discont
This commit is contained in:
Benjamin Otte 2004-03-29 15:58:02 +00:00
parent 4f2142927a
commit a4d30a4b6d
2 changed files with 14 additions and 7 deletions

View file

@ -1,3 +1,8 @@
2004-03-29 Benjamin Otte <otte@gnome.org>
* ext/mad/gstid3tag.c: (gst_id3_tag_handle_event):
try harder to check if an event is really a discont
2004-03-29 Thomas Vander Stichele <thomas at apestaart dot org>
* po/LINGUAS: adding Azerbaijani (Mətin Əmirov)

View file

@ -692,13 +692,15 @@ gst_id3_tag_handle_event (GstPad * pad, GstEvent * event)
case GST_ID3_TAG_STATE_READING_V2_TAG:{
guint64 value;
gst_event_discont_get_value (event, GST_FORMAT_BYTES, &value);
if (value !=
(tag->buffer ? GST_BUFFER_OFFSET (tag->buffer) +
GST_BUFFER_SIZE (tag->buffer)
: 0))
GST_ELEMENT_ERROR (tag, CORE, EVENT, (NULL),
("Seek during ID3v2 tag reading"));
if (gst_event_discont_get_value (event, GST_FORMAT_BYTES, &value) ||
gst_event_discont_get_value (event, GST_FORMAT_DEFAULT, &value)) {
if (value !=
(tag->buffer ? GST_BUFFER_OFFSET (tag->buffer) +
GST_BUFFER_SIZE (tag->buffer)
: 0))
GST_ELEMENT_ERROR (tag, CORE, EVENT, (NULL),
("Seek during ID3v2 tag reading"));
}
gst_data_unref (GST_DATA (event));
break;
}