Skip to content

Commit

Permalink
dvdplayer: allow rewinding at end of stream, do a seek after rewind
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta committed Nov 12, 2014
1 parent bd7da38 commit 0eb484a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion xbmc/cores/dvdplayer/DVDPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1796,7 +1796,7 @@ void CDVDPlayer::HandlePlaySpeed()

}
else if (m_CurrentVideo.id >= 0
&& m_CurrentVideo.inited == true
&& (m_CurrentVideo.inited == true || GetPlaySpeed() < 0) // allow rewind at end of file
&& m_SpeedState.lastpts != m_dvdPlayerVideo->GetCurrentPts()
&& m_SpeedState.lasttime != GetTime())
{
Expand Down Expand Up @@ -2443,6 +2443,12 @@ void CDVDPlayer::HandleMessages()
pvrinputstream->Pause( speed == 0 );
}

// do a seek after rewind, clock is not in sync with current pts
if (m_playSpeed < 0 && speed >= 0)
{
m_messenger.Put(new CDVDMsgPlayerSeek(GetTime(), true, true, true));
}

// if playspeed is different then DVD_PLAYSPEED_NORMAL or DVD_PLAYSPEED_PAUSE
// audioplayer, stops outputing audio to audiorendere, but still tries to
// sleep an correct amount for each packet
Expand Down

0 comments on commit 0eb484a

Please sign in to comment.