mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
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
This commit is contained in:
parent
f90bb8140d
commit
9d85e23c3d
1 changed files with 3 additions and 2 deletions
|
@ -1185,8 +1185,6 @@ gst_xvimagesink_navigation_send_event (GstNavigation * navigation,
|
||||||
|
|
||||||
gst_event_ref (event);
|
gst_event_ref (event);
|
||||||
handled = gst_pad_send_event (peer, event);
|
handled = gst_pad_send_event (peer, event);
|
||||||
if (handled)
|
|
||||||
gst_event_unref (event);
|
|
||||||
gst_object_unref (peer);
|
gst_object_unref (peer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1194,6 +1192,9 @@ gst_xvimagesink_navigation_send_event (GstNavigation * navigation,
|
||||||
gst_element_post_message ((GstElement *) xvimagesink,
|
gst_element_post_message ((GstElement *) xvimagesink,
|
||||||
gst_navigation_message_new_event ((GstObject *) xvimagesink, event));
|
gst_navigation_message_new_event ((GstObject *) xvimagesink, event));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event)
|
||||||
|
gst_event_unref (event);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue