From 4e593cebab944d60124b1e9d2dc0b297bcc2829a Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Wed, 6 Nov 2019 21:53:09 +0100 Subject: [PATCH] Add const --- src/engine/gstenginepipeline.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/engine/gstenginepipeline.cpp b/src/engine/gstenginepipeline.cpp index f25bca3d0..f49a77c71 100644 --- a/src/engine/gstenginepipeline.cpp +++ b/src/engine/gstenginepipeline.cpp @@ -141,8 +141,10 @@ GstEnginePipeline::~GstEnginePipeline() { g_signal_handler_disconnect(G_OBJECT(pipeline_), notify_source_cb_id_); gst_bus_set_sync_handler(gst_pipeline_get_bus(GST_PIPELINE(pipeline_)), nullptr, nullptr, nullptr); + if (bus_cb_id_ != -1) g_source_remove(bus_cb_id_); + gst_element_set_state(pipeline_, GST_STATE_NULL); gst_object_unref(GST_OBJECT(pipeline_)); @@ -956,8 +958,7 @@ GstState GstEnginePipeline::state() const { } -QFuture GstEnginePipeline::SetState(GstState state) { - +QFuture GstEnginePipeline::SetState(const GstState state) { return ConcurrentRun::Run(&set_state_threadpool_, &gst_element_set_state, pipeline_, state); }