Skip to content

Commit

Permalink
Fixed: unable unload filter.
Browse files Browse the repository at this point in the history
  • Loading branch information
ekyt committed Dec 3, 2012
1 parent f2f92aa commit 0ceac96
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
22 changes: 22 additions & 0 deletions xbmc/cores/DSPlayer/DSGraph.cpp
Expand Up @@ -180,6 +180,28 @@ void CDSGraph::CloseFile()
m_VideoInfo.Clear();
m_State.Clear();

BeginEnumFilters(pFilterGraph, pEM, pBF)
{
CStdString filterName;
g_charsetConverter.wToUTF8(GetFilterName(pBF), filterName);

try
{
hr = RemoveFilter(pFilterGraph, pBF);
}
catch (...)
{
hr = E_FAIL;
}

if (SUCCEEDED(hr))
CLog::Log(LOGNOTICE, "%s Successfully removed \"%s\" from the graph", __FUNCTION__, filterName.c_str());
else
CLog::Log(LOGERROR, "%s Failed to remove \"%s\" from the graph", __FUNCTION__, filterName.c_str());

pEM->Reset();
}
EndEnumFilters

SAFE_DELETE(m_pGraphBuilder);

Expand Down
2 changes: 2 additions & 0 deletions xbmc/cores/DSPlayer/GraphFilters.h
Expand Up @@ -41,6 +41,8 @@ struct SFilterInfos
~SFilterInfos()
{
SAFE_DELETE(pData);
if(!isinternal)
pBF.FullRelease();
}

void Clear()
Expand Down

0 comments on commit 0ceac96

Please sign in to comment.