diff --git a/src/engines/gstengine.cpp b/src/engines/gstengine.cpp index 932115978..ed5e1e8ea 100644 --- a/src/engines/gstengine.cpp +++ b/src/engines/gstengine.cpp @@ -763,7 +763,6 @@ GstElement* GstEngine::CreateElement(const QString& factoryName, "Please make sure that you have installed all necessary " "GStreamer plugins (e.g. OGG and MP3)") .arg(factoryName)); - if (bin) gst_object_unref(GST_OBJECT(bin)); return nullptr; } diff --git a/src/engines/gstenginepipeline.cpp b/src/engines/gstenginepipeline.cpp index 471da8217..6f36ce681 100644 --- a/src/engines/gstenginepipeline.cpp +++ b/src/engines/gstenginepipeline.cpp @@ -267,6 +267,7 @@ bool GstEnginePipeline::Init() { // Audio bin audiobin_ = gst_bin_new("audiobin"); + // Floating reference is transferred to pipeline gst_bin_add(GST_BIN(pipeline_), audiobin_); // Create the sink