From c4fe52e33ebee3802b2fd27992c1aae18f7e0d95 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 15 May 2013 09:47:21 +0200 Subject: [PATCH] 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. --- ext/kate/gstkateparse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/kate/gstkateparse.c b/ext/kate/gstkateparse.c index 7bc5173031..cbbd912e0c 100644 --- a/ext/kate/gstkateparse.c +++ b/ext/kate/gstkateparse.c @@ -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); -- 2.34.1