Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2013-10-28 12:24:50 +0400
committerHendrik Leppkes <h.leppkes@gmail.com>2013-10-28 12:24:50 +0400
commit9e8221a2d80cc91886e05fa3c6a48f4e6f4f6fd6 (patch)
tree080093da8fca60b5c755074b9bf8e484c10ed823 /demuxer
parent14e6b403a50b04ae23f4411ee52cb9727118310e (diff)
Protect tray icon creation with a lock
This ensures that the tray icon cannot be created from multiple places at the same time.
Diffstat (limited to 'demuxer')
-rw-r--r--demuxer/LAVSplitter/LAVSplitter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/demuxer/LAVSplitter/LAVSplitter.cpp b/demuxer/LAVSplitter/LAVSplitter.cpp
index 4a040854..09ef7f1c 100644
--- a/demuxer/LAVSplitter/LAVSplitter.cpp
+++ b/demuxer/LAVSplitter/LAVSplitter.cpp
@@ -124,6 +124,9 @@ STDMETHODIMP CLAVSplitter::Close()
STDMETHODIMP CLAVSplitter::CreateTrayIcon()
{
+ CAutoLock cObjectLock(m_pLock);
+ if (m_pTrayIcon)
+ return E_UNEXPECTED;
if (CBaseTrayIcon::ProcessBlackList())
return S_FALSE;
m_pTrayIcon = new CLAVSplitterTrayIcon(this, TEXT(LAV_SPLITTER), IDI_ICON1);