examples/gl: unref bus and element after usage

gst_pipeline_get_bus() and gst_bin_get_by_interface() both
return references that need to be unreferenced after usage.

https://bugzilla.gnome.org/show_bug.cgi?id=734527
This commit is contained in:
Sebastian Rasmussen 2014-08-09 11:45:41 +02:00 committed by Tim-Philipp Müller
parent 6bbcefe029
commit 06961ea200
3 changed files with 3 additions and 0 deletions

View file

@ -164,6 +164,7 @@ main (int argc, char *argv[])
gst_bus_set_sync_handler (bus, (GstBusSyncHandler) create_window, actor,
NULL);
gst_object_unref (bus);
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);

View file

@ -217,6 +217,7 @@ main (int argc, char *argv[])
gst_bus_set_sync_handler (bus, (GstBusSyncHandler) create_window, actor,
NULL);
gst_object_unref (bus);
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);

View file

@ -42,6 +42,7 @@ expose_cb (GtkWidget * widget, gpointer data)
GST_TYPE_VIDEO_OVERLAY));
gst_video_overlay_set_gtk_window (overlay, widget);
gst_object_unref (overlay);
return FALSE;
}