mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-20 14:18:34 +00:00
camerabinpreview: fix bus leak
We were never removing the watch introduced in gst_camerabin_create_preview_pipeline() so its extra ref on the bus was never released. https://bugzilla.gnome.org/show_bug.cgi?id=768838
This commit is contained in:
parent
6697feae5f
commit
d29ec01b8a
1 changed files with 7 additions and 0 deletions
|
@ -235,7 +235,14 @@ gst_camerabin_destroy_preview_pipeline (GstCameraBinPreviewPipelineData *
|
|||
g_cond_clear (&preview->processing_cond);
|
||||
|
||||
if (preview->pipeline) {
|
||||
GstBus *bus;
|
||||
|
||||
gst_element_set_state (preview->pipeline, GST_STATE_NULL);
|
||||
|
||||
bus = gst_pipeline_get_bus (GST_PIPELINE (preview->pipeline));
|
||||
gst_bus_remove_watch (bus);
|
||||
gst_object_unref (bus);
|
||||
|
||||
gst_object_unref (preview->pipeline);
|
||||
}
|
||||
g_free (preview);
|
||||
|
|
Loading…
Reference in a new issue