From 9d85e23c3d960724a551e057cf412989174ee875 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 4 May 2015 18:00:18 +0200 Subject: [PATCH] xvimagesink: fix navigation event leak when not handled gst_navigation_message_new_event() is *not* consuming the event so we should always drop our extra reference. https://bugzilla.gnome.org/show_bug.cgi?id=748903 --- sys/xvimage/xvimagesink.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index 38f9de8..6112545 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -1185,8 +1185,6 @@ gst_xvimagesink_navigation_send_event (GstNavigation * navigation, gst_event_ref (event); handled = gst_pad_send_event (peer, event); - if (handled) - gst_event_unref (event); gst_object_unref (peer); } @@ -1194,6 +1192,9 @@ gst_xvimagesink_navigation_send_event (GstNavigation * navigation, gst_element_post_message ((GstElement *) xvimagesink, gst_navigation_message_new_event ((GstObject *) xvimagesink, event)); } + + if (event) + gst_event_unref (event); } static void -- 2.7.4