summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/ds9/backendnode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/phonon/ds9/backendnode.cpp')
-rw-r--r--src/3rdparty/phonon/ds9/backendnode.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/3rdparty/phonon/ds9/backendnode.cpp b/src/3rdparty/phonon/ds9/backendnode.cpp
index 7e0b3cd..737ab7b 100644
--- a/src/3rdparty/phonon/ds9/backendnode.cpp
+++ b/src/3rdparty/phonon/ds9/backendnode.cpp
@@ -57,6 +57,25 @@ namespace Phonon
BackendNode::~BackendNode()
{
+ //this will remove the filter from the graph
+ FILTER_INFO info;
+ for(int i = 0; i < FILTER_COUNT; ++i) {
+ const Filter &filter = m_filters[i];
+ if (!filter)
+ continue;
+ filter->QueryFilterInfo(&info);
+ if (info.pGraph) {
+ HRESULT hr = info.pGraph->RemoveFilter(filter);
+
+ if (FAILED(hr) && m_mediaObject) {
+ m_mediaObject->ensureStopped();
+
+ hr = info.pGraph->RemoveFilter(filter);
+ }
+ Q_ASSERT(SUCCEEDED(hr));
+ info.pGraph->Release();
+ }
+ }
}
void BackendNode::setMediaObject(MediaObject *mo)