mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 12:48:16 +00:00
Fix a regression with rewinding in QuickTime videos (looping works in Riven again) and some minor cleanup.
svn-id: r49206
This commit is contained in:
parent
58a7dbe721
commit
ab540af9f8
@ -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 {
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user