kateparse: Fix event handling

Internal state should only be reset on FLUSH_STOP, not FLUSH_START.

Also forward pre-caps events immediately and don't queue them.
This commit is contained in:
Sebastian Dröge 2013-05-15 09:47:21 +02:00
parent bca7bdc27e
commit c4fe52e33e

View file

@ -421,7 +421,7 @@ gst_kate_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
parse = GST_KATE_PARSE (parent);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_FLUSH_START:
case GST_EVENT_FLUSH_STOP:
gst_kate_parse_clear_queue (parse);
ret = gst_pad_event_default (pad, parent, event);
break;
@ -436,7 +436,8 @@ gst_kate_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
ret = gst_pad_event_default (pad, parent, event);
break;
default:
if (!parse->streamheader_sent && GST_EVENT_IS_SERIALIZED (event))
if (!parse->streamheader_sent && GST_EVENT_IS_SERIALIZED (event)
&& GST_EVENT_TYPE (event) > GST_EVENT_CAPS)
ret = gst_kate_parse_queue_event (parse, event);
else
ret = gst_pad_event_default (pad, parent, event);