Skip to content

Commit

Permalink
vdpau: set display state to reset if display event times out, system …
Browse files Browse the repository at this point in the history
…was stuck in state LOST;
  • Loading branch information
FernetMenta committed Feb 22, 2012
1 parent 4ef3a39 commit 733002f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
Expand Up @@ -413,9 +413,11 @@ int CVDPAU::Check(AVCodecContext* avctx)
if (!m_DisplayEvent.WaitMSec(2000))
{
CLog::Log(LOGERROR, "CVDPAU::Check - device didn't reset in reasonable time");
return VC_ERROR;
state = VDPAU_RESET;
}
{ CSharedLock lock(m_DisplaySection);
else
{
CSharedLock lock(m_DisplaySection);
state = m_DisplayState;
}
}
Expand Down Expand Up @@ -1612,7 +1614,10 @@ bool CVDPAU::CheckStatus(VdpStatus vdp_st, int line)
if(m_DisplayState == VDPAU_OPEN)
{
if (vdp_st == VDP_STATUS_DISPLAY_PREEMPTED)
{
m_DisplayEvent.Reset();
m_DisplayState = VDPAU_LOST;
}
else
m_DisplayState = VDPAU_ERROR;
}
Expand Down

0 comments on commit 733002f

Please sign in to comment.