+2004-03-14 Benjamin Otte <otte@gnome.org>
+
+ * gst/modplug/gstmodplug.cc:
+ handle events - don't do crap when a discont arrives that's not
+ necessary
+ This allows correct loading and playback of mods in Rhythmbox
+
2004-03-14 Benjamin Otte <otte@gnome.org>
* configure.ac:
modplug->buffer_in = NULL;
modplug->state = MODPLUG_STATE_NEED_TUNE;
+ GST_FLAG_SET (modplug, GST_ELEMENT_EVENT_AWARE);
}
static void
static void
gst_modplug_handle_event (GstModPlug *modplug)
{
+ gint64 value;
guint32 remaining;
GstEvent *event;
}
switch (GST_EVENT_TYPE (event)) {
+ case GST_EVENT_EOS:
+ gst_event_unref (event);
+ break;
case GST_EVENT_DISCONTINUOUS:
+ if (gst_event_discont_get_value (event, GST_FORMAT_BYTES, &value)) {
+ if (remaining == value) {
+ gst_event_unref (event);
+ break;
+ }
+ }
gst_bytestream_flush_fast (modplug->bs, remaining);
default:
gst_pad_event_default (modplug->sinkpad, event);