[Scummvm-cvs-logs] SF.net SVN: scummvm:[49206] scummvm/trunk/graphics/video
mthreepwood at users.sourceforge.net
mthreepwood at users.sourceforge.net
Tue May 25 04:35:50 CEST 2010
Revision: 49206
http://scummvm.svn.sourceforge.net/scummvm/?rev=49206&view=rev
Author: mthreepwood
Date: 2010-05-25 02:35:50 +0000 (Tue, 25 May 2010)
Log Message:
-----------
Fix a regression with rewinding in QuickTime videos (looping works in Riven again) and some minor cleanup.
Modified Paths:
--------------
scummvm/trunk/graphics/video/qt_decoder.cpp
scummvm/trunk/graphics/video/qt_decoder.h
Modified: scummvm/trunk/graphics/video/qt_decoder.cpp
===================================================================
--- scummvm/trunk/graphics/video/qt_decoder.cpp 2010-05-24 23:15:59 UTC (rev 49205)
+++ scummvm/trunk/graphics/video/qt_decoder.cpp 2010-05-25 02:35:50 UTC (rev 49206)
@@ -146,9 +146,8 @@
}
void QuickTimeDecoder::rewind() {
- delete _videoCodec; _videoCodec = NULL;
- _curFrame = -1;
- _startTime = _nextFrameStartTime = 0;
+ VideoDecoder::reset();
+ _nextFrameStartTime = 0;
// Restart the audio too
stopAudio();
@@ -243,13 +242,9 @@
}
bool QuickTimeDecoder::endOfVideo() const {
- return (!_audStream || _audStream->endOfData()) && (!_videoCodec || _curFrame >= (int32)getFrameCount() - 1);
+ return (!_audStream || _audStream->endOfData()) && (!_videoCodec || VideoDecoder::endOfVideo());
}
-bool QuickTimeDecoder::needsUpdate() const {
- return !endOfVideo() && getTimeToNextFrame() == 0;
-}
-
uint32 QuickTimeDecoder::getElapsedTime() const {
if (_audStream)
return g_system->getMixer()->getSoundElapsedTime(_audHandle);
Modified: scummvm/trunk/graphics/video/qt_decoder.h
===================================================================
--- scummvm/trunk/graphics/video/qt_decoder.h 2010-05-24 23:15:59 UTC (rev 49205)
+++ scummvm/trunk/graphics/video/qt_decoder.h 2010-05-25 02:35:50 UTC (rev 49206)
@@ -112,7 +112,6 @@
bool isVideoLoaded() const { return _fd != 0; }
Surface *decodeNextFrame();
- bool needsUpdate() const;
bool endOfVideo() const;
uint32 getElapsedTime() const;
uint32 getTimeToNextFrame() const;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list