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
@ -235,7 +235,14 @@ gst_camerabin_destroy_preview_pipeline (GstCameraBinPreviewPipelineData *
|
|||||||
g_cond_clear (&preview->processing_cond);
|
g_cond_clear (&preview->processing_cond);
|
||||||
|
|
||||||
if (preview->pipeline) {
|
if (preview->pipeline) {
|
||||||
|
GstBus *bus;
|
||||||
|
|
||||||
gst_element_set_state (preview->pipeline, GST_STATE_NULL);
|
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);
|
gst_object_unref (preview->pipeline);
|
||||||
}
|
}
|
||||||
g_free (preview);
|
g_free (preview);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user