[Scummvm-cvs-logs] scummvm master -> 8b46b64ad4ba1204a3c95e8fc3b0fe62826f4992
clone2727
clone2727 at gmail.com
Wed Sep 19 06:38:03 CEST 2012
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8b46b64ad4 VIDEO: Fix getTime() after a stop() call
Commit: 8b46b64ad4ba1204a3c95e8fc3b0fe62826f4992
https://github.com/scummvm/scummvm/commit/8b46b64ad4ba1204a3c95e8fc3b0fe62826f4992
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2012-09-18T21:36:03-07:00
Commit Message:
VIDEO: Fix getTime() after a stop() call
Changed paths:
video/video_decoder.cpp
diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp
index 24287c4..b4f44d9 100644
--- a/video/video_decoder.cpp
+++ b/video/video_decoder.cpp
@@ -342,19 +342,23 @@ void VideoDecoder::stop() {
if (!isPlaying())
return;
+ // Stop audio here so we don't have it affect getTime()
+ stopAudio();
+
+ // Keep the time marked down in case we start up again
+ // We do this before _isPlaying is set so we don't get
+ // _lastTimeChange returned, but before _pauseLevel is
+ // reset.
+ _lastTimeChange = getTime();
+
_isPlaying = false;
_startTime = 0;
_palette = 0;
_dirtyPalette = false;
_needsUpdate = false;
- stopAudio();
-
// Also reset the pause state.
_pauseLevel = 0;
-
- // Keep the time marked down in case we start up again
- _lastTimeChange = getTime();
}
Audio::Timestamp VideoDecoder::getDuration() const {
More information about the Scummvm-git-logs
mailing list