summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Kendall <mkendall@mythtv.org>2011-01-25 02:29:00 (GMT)
committer Mark Kendall <mkendall@mythtv.org>2011-01-26 02:07:24 (GMT)
commit57812c6f8af8ceb45144638f45c66560fc0c499b (patch)
tree3eeed8113bb81c92a3ec7d1eb8392e25a6c45680
parente6fa6c2104983b6d45878c1deb07188f3d9daed3 (diff)
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 b4f10394e5d668266810cddebb1bccecd8c17e92)
-rw-r--r--mythtv/libs/libmythtv/mythplayer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mythtv/libs/libmythtv/mythplayer.cpp b/mythtv/libs/libmythtv/mythplayer.cpp
index 771cc9d..19f2803 100644
--- a/mythtv/libs/libmythtv/mythplayer.cpp
+++ b/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;