aboutsummaryrefslogtreecommitdiff
path: root/graphics/video/dxa_decoder.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2010-05-17 21:59:05 +0000
committerMatthew Hoops2010-05-17 21:59:05 +0000
commitc7fa1074fbc55e9e519f9c7e08dea9603af22e61 (patch)
tree502ce42530df3ea513eebf7096dfc72bf05a3dd7 /graphics/video/dxa_decoder.cpp
parentea84abf5880f0af2642dd3de08a6d9c6f7f88426 (diff)
downloadscummvm-rg350-c7fa1074fbc55e9e519f9c7e08dea9603af22e61.tar.gz
scummvm-rg350-c7fa1074fbc55e9e519f9c7e08dea9603af22e61.tar.bz2
scummvm-rg350-c7fa1074fbc55e9e519f9c7e08dea9603af22e61.zip
Change VideoDecoder::getCurFrame() to mean the last frame drawn instead of the next frame to draw. This is patch 1 from patch #2963496 (VideoDecoder Rewrite).
svn-id: r49063
Diffstat (limited to 'graphics/video/dxa_decoder.cpp')
-rw-r--r--graphics/video/dxa_decoder.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/graphics/video/dxa_decoder.cpp b/graphics/video/dxa_decoder.cpp
index 827ee0846f..86f2415922 100644
--- a/graphics/video/dxa_decoder.cpp
+++ b/graphics/video/dxa_decoder.cpp
@@ -56,7 +56,7 @@ DXADecoder::DXADecoder() {
_frameSize = 0;
_videoInfo.frameCount = 0;
- _videoInfo.currentFrame = 0;
+ _videoInfo.currentFrame = -1;
_videoInfo.frameRate = 0;
_videoInfo.frameDelay = 0;
@@ -159,7 +159,7 @@ bool DXADecoder::loadFile(const char *fileName) {
// Read the sound header
_soundTag = _fileStream->readUint32BE();
- _videoInfo.currentFrame = 0;
+ _videoInfo.currentFrame = -1;
_videoInfo.firstframeOffset = _fileStream->pos();
@@ -484,6 +484,8 @@ void DXADecoder::decode13(int size) {
bool DXADecoder::decodeNextFrame() {
uint32 tag;
+ _videoInfo.currentFrame++;
+
if (_videoInfo.currentFrame == 0)
_videoInfo.startTime = g_system->getMillis();
@@ -557,7 +559,7 @@ bool DXADecoder::decodeNextFrame() {
break;
}
- return ++_videoInfo.currentFrame < _videoInfo.frameCount;
+ return !endOfVideo();
}
} // End of namespace Graphics