diff options
Diffstat (limited to 'video/video_decoder.cpp')
-rw-r--r-- | video/video_decoder.cpp | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index c9d3d22070..24287c4d33 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -35,7 +35,6 @@ namespace Video { VideoDecoder::VideoDecoder() { _startTime = 0; - _needsRewind = false; _dirtyPalette = false; _palette = 0; _isPlaying = false; @@ -62,7 +61,6 @@ void VideoDecoder::close() { delete *it; _tracks.clear(); - _needsRewind = false; _dirtyPalette = false; _palette = 0; _startTime = 0; @@ -271,8 +269,6 @@ bool VideoDecoder::rewind() { if (!isRewindable()) return false; - _needsRewind = false; - // Stop all tracks so they can be rewound if (isPlaying()) stopAudio(); @@ -306,8 +302,6 @@ bool VideoDecoder::seek(const Audio::Timestamp &time) { if (!isSeekable()) return false; - _needsRewind = false; - // Stop all tracks so they can be seeked if (isPlaying()) stopAudio(); @@ -337,10 +331,6 @@ void VideoDecoder::start() { _isPlaying = true; _startTime = g_system->getMillis(); - // If someone previously called stop(), we'll rewind it. - if (_needsRewind) - rewind(); - // Adjust start time if we've seeked to something besides zero time if (_lastTimeChange.totalNumberOfFrames() != 0) _startTime -= _lastTimeChange.msecs(); @@ -363,15 +353,8 @@ void VideoDecoder::stop() { // Also reset the pause state. _pauseLevel = 0; - // If this is a rewindable video, don't close it too. We'll just rewind() the video - // the next time someone calls start(). Otherwise, since it can't be rewound, we - // just close it. - if (isRewindable()) { - _lastTimeChange = getTime(); - _needsRewind = true; - } else { - close(); - } + // Keep the time marked down in case we start up again + _lastTimeChange = getTime(); } Audio::Timestamp VideoDecoder::getDuration() const { |