mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 14:36:24 +00:00
seek: Keep a reference to the xoverlay element
This commit is contained in:
parent
775d851d66
commit
4262e93019
1 changed files with 6 additions and 1 deletions
|
@ -2476,7 +2476,9 @@ bus_sync_handler (GstBus * bus, GstMessage * message, GstPipeline * data)
|
|||
gst_structure_has_name (message->structure, "prepare-xwindow-id")) {
|
||||
GstElement *element = GST_ELEMENT (GST_MESSAGE_SRC (message));
|
||||
|
||||
xoverlay_element = element;
|
||||
if (xoverlay_element)
|
||||
gst_object_unref (xoverlay_element);
|
||||
xoverlay_element = GST_ELEMENT (gst_object_ref (element));
|
||||
|
||||
g_print ("got prepare-xwindow-id, setting XID %lu\n", embed_xid);
|
||||
|
||||
|
@ -3035,6 +3037,9 @@ main (int argc, char **argv)
|
|||
g_print ("NULL pipeline\n");
|
||||
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||
|
||||
if (xoverlay_element)
|
||||
gst_object_unref (xoverlay_element);
|
||||
|
||||
g_print ("free pipeline\n");
|
||||
gst_object_unref (pipeline);
|
||||
|
||||
|
|
Loading…
Reference in a new issue