aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/video/qt_decoder.cpp11
-rw-r--r--graphics/video/qt_decoder.h1
2 files changed, 3 insertions, 9 deletions
diff --git a/graphics/video/qt_decoder.cpp b/graphics/video/qt_decoder.cpp
index 5e50772024..a2d088758d 100644
--- a/graphics/video/qt_decoder.cpp
+++ b/graphics/video/qt_decoder.cpp
@@ -146,9 +146,8 @@ PixelFormat QuickTimeDecoder::getPixelFormat() const {
}
void QuickTimeDecoder::rewind() {
- delete _videoCodec; _videoCodec = NULL;
- _curFrame = -1;
- _startTime = _nextFrameStartTime = 0;
+ VideoDecoder::reset();
+ _nextFrameStartTime = 0;
// Restart the audio too
stopAudio();
@@ -243,11 +242,7 @@ Surface *QuickTimeDecoder::scaleSurface(Surface *frame) {
}
bool QuickTimeDecoder::endOfVideo() const {
- return (!_audStream || _audStream->endOfData()) && (!_videoCodec || _curFrame >= (int32)getFrameCount() - 1);
-}
-
-bool QuickTimeDecoder::needsUpdate() const {
- return !endOfVideo() && getTimeToNextFrame() == 0;
+ return (!_audStream || _audStream->endOfData()) && (!_videoCodec || VideoDecoder::endOfVideo());
}
uint32 QuickTimeDecoder::getElapsedTime() const {
diff --git a/graphics/video/qt_decoder.h b/graphics/video/qt_decoder.h
index 545866f9e5..6d72464258 100644
--- a/graphics/video/qt_decoder.h
+++ b/graphics/video/qt_decoder.h
@@ -112,7 +112,6 @@ public:
bool isVideoLoaded() const { return _fd != 0; }
Surface *decodeNextFrame();
- bool needsUpdate() const;
bool endOfVideo() const;
uint32 getElapsedTime() const;
uint32 getTimeToNextFrame() const;