src/3rdparty/phonon/ds9/backendnode.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 30 5dc02b23752f
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
    56         }
    56         }
    57 
    57 
    58         BackendNode::~BackendNode()
    58         BackendNode::~BackendNode()
    59         {
    59         {
    60             //this will remove the filter from the graph
    60             //this will remove the filter from the graph
    61             mediaObjectDestroyed();
    61             FILTER_INFO info;
       
    62             for(int i = 0; i < FILTER_COUNT; ++i) {
       
    63                 const Filter &filter = m_filters[i];
       
    64                 if (!filter)
       
    65                     continue;
       
    66                 filter->QueryFilterInfo(&info);
       
    67                 if (info.pGraph) {
       
    68                     HRESULT hr = info.pGraph->RemoveFilter(filter);
       
    69 
       
    70                     if (hr == VFW_E_NOT_STOPPED && m_mediaObject) {
       
    71                         m_mediaObject->ensureStopped();
       
    72 
       
    73                         hr = info.pGraph->RemoveFilter(filter);
       
    74                     }
       
    75                     Q_ASSERT(SUCCEEDED(hr));
       
    76                     info.pGraph->Release();
       
    77                 }
       
    78             }
    62         }
    79         }
    63 
    80 
    64         void BackendNode::setMediaObject(MediaObject *mo)
    81         void BackendNode::setMediaObject(MediaObject *mo)
    65         {
    82         {
    66             if (m_mediaObject) {
    83             if (m_mediaObject) {