Skip to content
Browse files

MythPlayer: Reorder pause/unpause sequence.

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...
1 parent e6fa6c2 commit 57812c6f8af8ceb45144638f45c66560fc0c499b Mark Kendall committed Jan 25, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 mythtv/libs/libmythtv/mythplayer.cpp
View
4 mythtv/libs/libmythtv/mythplayer.cpp
@@ -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;
{
@@ -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;

0 comments on commit 57812c6

Please sign in to comment.
Something went wrong with that request. Please try again.