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-25 02:29:00 (GMT)
commitb4f10394e5d668266810cddebb1bccecd8c17e92 (patch)
tree5b9e8b6302f3ead216cc24fcd8b49b60716126f2
parentb49f6e0b5aa689b9a8860d8ca90d75c9fcd7c629 (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.
-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 1e84d86..1a83c92 100644
--- a/mythtv/libs/libmythtv/mythplayer.cpp
+++ b/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;