diff options
author | Sven Hesse | 2010-11-08 17:03:27 +0000 |
---|---|---|
committer | Sven Hesse | 2010-11-08 17:03:27 +0000 |
commit | 9c349cf78b21ef147ab739003d5f89d6d537c1c9 (patch) | |
tree | 59bb93a402e9cd8204e97c530765ca9294dd3141 /graphics | |
parent | 8504e30dac5d3d362242277e4270dcec07a68798 (diff) | |
download | scummvm-rg350-9c349cf78b21ef147ab739003d5f89d6d537c1c9.tar.gz scummvm-rg350-9c349cf78b21ef147ab739003d5f89d6d537c1c9.tar.bz2 scummvm-rg350-9c349cf78b21ef147ab739003d5f89d6d537c1c9.zip |
VIDEO: PreIMD: End frame when stream depleted
As happens for the last frames in the Fascination videos.
svn-id: r54144
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/video/coktel_decoder.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/graphics/video/coktel_decoder.cpp b/graphics/video/coktel_decoder.cpp index 6ebc64592e..15ba049536 100644 --- a/graphics/video/coktel_decoder.cpp +++ b/graphics/video/coktel_decoder.cpp @@ -684,11 +684,11 @@ Surface *PreIMDDecoder::decodeNextFrame() { } void PreIMDDecoder::processFrame() { + _curFrame++; + uint16 frameSize = _stream->readUint16LE(); - if (frameSize == 0) { - _curFrame++; + if (_stream->eos() || (frameSize == 0)) return; - } uint32 nextFramePos = _stream->pos() + frameSize + 2; @@ -752,8 +752,6 @@ void PreIMDDecoder::processFrame() { } _stream->seek(nextFramePos); - - _curFrame++; } // Just a simple blit |