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.
(cherry picked from commit b4f1039)
  • Loading branch information
Mark Kendall committed Jan 26, 2011
1 parent e6fa6c2 commit 57812c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/mythplayer.cpp
Expand Up @@ -337,9 +337,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 @@ -368,10 +368,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 57812c6

Please sign in to comment.