Merge pull request #4668 from TheUbuntuGuy/master

Fix socket leak in moodbarpipeline
This commit is contained in:
ArnaudBienner 2014-12-22 22:39:42 +01:00
commit 3288c7d289
1 changed files with 4 additions and 2 deletions

View File

@ -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;