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.
  • Loading branch information...
1 parent b49f6e0 commit b4f10394e5d668266810cddebb1bccecd8c17e92 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
@@ -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;
{
@@ -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;

0 comments on commit b4f1039

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