diff options
author | Ognyan Tonchev <ognyan@axis.com> | 2014-09-17 14:34:25 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-09-19 09:38:14 +0300 |
commit | a7beaf8707ab6f6d16c7706f0236ab1ea715b83e (patch) | |
tree | becb053c423d5fbc7f9bdd82b6d2f365153733e4 | |
parent | b2210aac3d74aaa01f9ea146934dbb6c77840e0d (diff) | |
download | gstreamer-plugins-base-a7beaf8707ab6f6d16c7706f0236ab1ea715b83e.tar.gz |
streamsplitter: do not leak events when flushing them
https://bugzilla.gnome.org/show_bug.cgi?id=736796
-rw-r--r-- | gst/encoding/gststreamsplitter.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gst/encoding/gststreamsplitter.c b/gst/encoding/gststreamsplitter.c index 38618335b..6bf3894d0 100644 --- a/gst/encoding/gststreamsplitter.c +++ b/gst/encoding/gststreamsplitter.c @@ -155,13 +155,13 @@ _flush_events (GstPad * pad, GList * events) GList *tmp; for (tmp = events; tmp; tmp = tmp->next) { - if (GST_EVENT_TYPE (tmp->data) == GST_EVENT_EOS || - GST_EVENT_TYPE (tmp->data) == GST_EVENT_SEGMENT || - !GST_EVENT_IS_STICKY (tmp->data) || pad == NULL) { - gst_event_unref (tmp->data); - } else { + if (GST_EVENT_TYPE (tmp->data) != GST_EVENT_EOS && + GST_EVENT_TYPE (tmp->data) != GST_EVENT_SEGMENT && + GST_EVENT_IS_STICKY (tmp->data) && + pad != NULL) { gst_pad_store_sticky_event (pad, GST_EVENT_CAST (tmp->data)); } + gst_event_unref (tmp->data); } g_list_free (events); |