mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-22 23:41:30 +01:00
Fix socket leak in moodbarpipeline
Fixes #4663 When tearing down the pipeline, there was a leak of a GstBus which holds a socketpair open. Eventually the OS runs out of file descriptors and terminates Clementine.
This commit is contained in:
parent
efa58bb852
commit
3886f3d1e4
@ -190,8 +190,10 @@ void MoodbarPipeline::Cleanup() {
|
||||
Q_ASSERT(QThread::currentThread() != qApp->thread());
|
||||
|
||||
if (pipeline_) {
|
||||
gst_bus_set_sync_handler(gst_pipeline_get_bus(GST_PIPELINE(pipeline_)),
|
||||
nullptr, nullptr, nullptr);
|
||||
GstBus* bus = gst_pipeline_get_bus(GST_PIPELINE(pipeline_));
|
||||
gst_bus_set_sync_handler(bus, nullptr, nullptr, nullptr);
|
||||
gst_object_unref(bus);
|
||||
|
||||
gst_element_set_state(pipeline_, GST_STATE_NULL);
|
||||
gst_object_unref(pipeline_);
|
||||
pipeline_ = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user