mirror of
https://github.com/clsid2/mpc-hc
synced 2026-11-26 18:08:01 +08:00
Get lock before filter state access
This commit is contained in:
1 parent
951d6deffe
commit
fe74357a8c
1 file changed
+4
@@ -11571,6 +11571,8 @@ CRect CMainFrame::GetInvisibleBorderSize() const
|
||||
|
||||
OAFilterState CMainFrame::GetMediaStateDirect()
|
||||
{
|
||||
CAutoLock ga(&lockGraphAccess);
|
||||
|
||||
OAFilterState ret = -1;
|
||||
if (m_eMediaLoadState == MLS::LOADED) {
|
||||
m_pMC->GetState(0, &ret);
|
||||
@@ -11580,6 +11582,8 @@ OAFilterState CMainFrame::GetMediaStateDirect()
|
||||
|
||||
OAFilterState CMainFrame::GetMediaState()
|
||||
{
|
||||
CAutoLock ga(&lockGraphAccess);
|
||||
|
||||
OAFilterState ret = -1;
|
||||
if (m_eMediaLoadState == MLS::LOADED) {
|
||||
if (m_CachedFilterState != -1) {
|
||||
|
||||
Reference in new issue
Block a user