From a7cac24004bfae2cfe02a01f8136570d65b99c64 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sun, 28 Jul 2019 23:42:12 +0200 Subject: [PATCH] Unref pipeline in moodbar on failure --- src/moodbar/moodbarpipeline.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/moodbar/moodbarpipeline.cpp b/src/moodbar/moodbarpipeline.cpp index c818a2e36..44ffea8f4 100644 --- a/src/moodbar/moodbarpipeline.cpp +++ b/src/moodbar/moodbarpipeline.cpp @@ -93,6 +93,7 @@ void MoodbarPipeline::Start() { GstElement* fakesink = CreateElement("fakesink"); if (!decodebin || !convert_element_ || !spectrum || !fakesink) { + gst_object_unref(GST_OBJECT(pipeline_)); pipeline_ = nullptr; emit Finished(false); return; @@ -101,6 +102,7 @@ void MoodbarPipeline::Start() { // Join them together if (!gst_element_link(convert_element_, spectrum) || !gst_element_link(spectrum, fakesink)) { qLog(Error) << "Failed to link elements"; + gst_object_unref(GST_OBJECT(pipeline_)); pipeline_ = nullptr; emit Finished(false); return;