Skip to content

Commit

Permalink
MythPlayer: Reorder pause/unpause sequence.
Browse files Browse the repository at this point in the history
The pause/unpause behaviour will be highly dependant on which thread is
calling Pause(), but broadly speaking the most involved and hence time
critical action is pausing/unpausing the decoder. Hence do this last on
pause so that the video (i.e. main thread) is more responsive and
unpause the decoder first before the video thread is occupied.
  • Loading branch information
Mark Kendall committed Jan 25, 2011
1 parent b49f6e0 commit b4f1039
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/mythplayer.cpp
Expand Up @@ -340,9 +340,9 @@ bool MythPlayer::Pause(void)
}
next_play_speed = 0.0;
next_normal_speed = false;
PauseDecoder();
PauseVideo();
audio.Pause(true);
PauseDecoder();
PauseBuffer();
allpaused = decoderPaused && videoPaused && bufferPaused;
{
Expand Down Expand Up @@ -371,10 +371,10 @@ bool MythPlayer::Play(float speed, bool normal, bool unpauseaudio)
}

UnpauseBuffer();
UnpauseDecoder();
if (unpauseaudio)
audio.Pause(false);
UnpauseVideo();
UnpauseDecoder();
allpaused = false;
next_play_speed = speed;
next_normal_speed = normal;
Expand Down

0 comments on commit b4f1039

Please sign in to comment.