mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-18 12:32:09 +01:00
gstengine: Remove extra unref on element creation failure
GstEngine::CreateElement unrefs the supplied bin if an error occurs. In all current cases, that bin is referenced by a pipeline.
This commit is contained in:
parent
5495445175
commit
616ccc6fde
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user