Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Commit

Permalink
changed the type of m_iMediaLoadState
Browse files Browse the repository at this point in the history
always stop IMediaControl in CMainFrame::CloseMediaPrivate() function (ticket #2471)
  • Loading branch information
v0lt committed Jul 29, 2012
1 parent 31afd10 commit 36deabb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/mpc-hc/MainFrm.cpp
Expand Up @@ -11941,8 +11941,9 @@ bool CMainFrame::OpenMediaPrivate(CAutoPtr<OpenMediaData> pOMD)

void CMainFrame::CloseMediaPrivate()
{
SetLoadState(MLS_CLOSING);
SetLoadState(MLS_CLOSING); // why it before OnPlayStop()? // TODO: remake or add detailed comments
OnPlayStop(); // SendMessage(WM_COMMAND, ID_PLAY_STOP);
pMC->Stop(); // neead for StreamBufferSource, because m_iMediaLoadState is always MLS_CLOSED // TODO: to fix the opening for such media
SetPlaybackMode(PM_NONE);
m_fLiveWM = false;
m_fEndOfStream = false;
Expand Down Expand Up @@ -14527,7 +14528,7 @@ void CMainFrame::DisplayCurrentChannelInfo()
void CMainFrame::SetLoadState(MPC_LOADSTATE iState)
{
m_iMediaLoadState = iState;
SendAPICommand(CMD_STATE, L"%d", m_iMediaLoadState);
SendAPICommand(CMD_STATE, L"%d", iState);
}

void CMainFrame::SetPlayState(MPC_PLAYSTATE iState)
Expand Down
2 changes: 1 addition & 1 deletion src/mpc-hc/MainFrm.h
Expand Up @@ -365,7 +365,7 @@ class CMainFrame : public CFrameWnd, public CDropTarget
CControlBar* m_pLastBar;

protected:
int m_iMediaLoadState;
MPC_LOADSTATE m_iMediaLoadState;

bool m_fClosingState;

Expand Down

0 comments on commit 36deabb

Please sign in to comment.