From cf04dc0486ea29f25993a59fbde7c8ba98a417f3 Mon Sep 17 00:00:00 2001 From: Ognyan Tonchev Date: Wed, 17 Sep 2014 17:17:10 +0200 Subject: [PATCH] typefindelement: do not leak sticky events in flush_stop https://bugzilla.gnome.org/show_bug.cgi?id=736813 --- plugins/elements/gsttypefindelement.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plugins/elements/gsttypefindelement.c b/plugins/elements/gsttypefindelement.c index e05a042..e8977fd 100644 --- a/plugins/elements/gsttypefindelement.c +++ b/plugins/elements/gsttypefindelement.c @@ -649,13 +649,12 @@ gst_type_find_element_sink_event (GstPad * pad, GstObject * parent, GST_OBJECT_LOCK (typefind); for (l = typefind->cached_events; l; l = l->next) { - if (!GST_EVENT_IS_STICKY (l->data) || - GST_EVENT_TYPE (l->data) == GST_EVENT_SEGMENT || - GST_EVENT_TYPE (l->data) == GST_EVENT_EOS) { - gst_event_unref (l->data); - } else { + if (GST_EVENT_IS_STICKY (l->data) && + GST_EVENT_TYPE (l->data) != GST_EVENT_SEGMENT && + GST_EVENT_TYPE (l->data) != GST_EVENT_EOS) { gst_pad_store_sticky_event (typefind->src, l->data); } + gst_event_unref (l->data); } g_list_free (typefind->cached_events); -- 2.7.4