summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2015-05-04 15:59:30 (GMT)
committerThiago Santos <thiagoss@osg.samsung.com>2015-05-05 16:54:08 (GMT)
commitca100d117cc5d3c9ed49a28cb1d7696ca50f42f8 (patch)
treee749bbb442d7c2fae89e049c7f0e55ea1be5c5e9
parent9d85e23c3d960724a551e057cf412989174ee875 (diff)
downloadgst-plugins-base-master.tar.gz
gst-plugins-base-master.tar.xz
xvimagesink: fix navigation event leak when early returningHEADmaster
Create the event *after* the early return check so it's not leaked. https://bugzilla.gnome.org/show_bug.cgi?id=748903
-rw-r--r--sys/xvimage/xvimagesink.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c
index 6112545..e8752d3 100644
--- a/sys/xvimage/xvimagesink.c
+++ b/sys/xvimage/xvimagesink.c
@@ -1137,8 +1137,6 @@ gst_xvimagesink_navigation_send_event (GstNavigation * navigation,
gdouble x, y, xscale = 1.0, yscale = 1.0;
GstXWindow *xwindow;
- event = gst_event_new_navigation (structure);
-
/* We take the flow_lock while we look at the window */
g_mutex_lock (&xvimagesink->flow_lock);
@@ -1183,6 +1181,7 @@ gst_xvimagesink_navigation_send_event (GstNavigation * navigation,
(gdouble) y * yscale, NULL);
}
+ event = gst_event_new_navigation (structure);
gst_event_ref (event);
handled = gst_pad_send_event (peer, event);
gst_object_unref (peer);