diff options
author | Ognyan Tonchev <ognyan@axis.com> | 2014-09-17 14:11:21 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-09-19 09:38:14 +0300 |
commit | b2210aac3d74aaa01f9ea146934dbb6c77840e0d (patch) | |
tree | 512033ac99cd42045f4bcc19abbbafb569242984 | |
parent | 7308601faa6185c345b56f1881e1c87bf1d092ee (diff) | |
download | gstreamer-plugins-base-b2210aac3d74aaa01f9ea146934dbb6c77840e0d.tar.gz |
videodecoder: do not leak events when flushing them
https://bugzilla.gnome.org/show_bug.cgi?id=736796
-rw-r--r-- | gst-libs/gst/video/gstvideodecoder.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c index d5e86dbe0..7c1c18100 100644 --- a/gst-libs/gst/video/gstvideodecoder.c +++ b/gst-libs/gst/video/gstvideodecoder.c @@ -1004,13 +1004,12 @@ _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)) { - 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)) { gst_pad_store_sticky_event (pad, GST_EVENT_CAST (tmp->data)); } + gst_event_unref (tmp->data); } g_list_free (events); |