aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2012-11-14 18:30:32 -0500
committerMatthew Hoops2012-11-14 18:30:54 -0500
commit51b2904cc12e5efe65b0d89faa2f296a8be77213 (patch)
tree458c8cc2667febdbaa761c528882c9442a1fe0ed
parente6a4bd8055ebf7ad17c5365602b54af41eb914e7 (diff)
downloadscummvm-rg350-51b2904cc12e5efe65b0d89faa2f296a8be77213.tar.gz
scummvm-rg350-51b2904cc12e5efe65b0d89faa2f296a8be77213.tar.bz2
scummvm-rg350-51b2904cc12e5efe65b0d89faa2f296a8be77213.zip
VIDEO: Improve a Cinepak heuristic
Brings it inline with the FFmpeg/libav version again
-rw-r--r--video/codecs/cinepak.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/video/codecs/cinepak.cpp b/video/codecs/cinepak.cpp
index c197e0cc35..f457d83749 100644
--- a/video/codecs/cinepak.cpp
+++ b/video/codecs/cinepak.cpp
@@ -87,10 +87,9 @@ const Graphics::Surface *CinepakDecoder::decodeImage(Common::SeekableReadStream
// Borrowed from FFMPEG. This should cut out the extra data Cinepak for Sega has (which is useless).
// The theory behind this is that this is here to confuse standard Cinepak decoders. But, we won't let that happen! ;)
if (_curFrame.length != (uint32)stream->size()) {
- uint16 temp = stream->readUint16BE();
- if (temp == 0xFE00)
+ if (stream->readUint16BE() == 0xFE00)
stream->readUint32BE();
- else if (temp != _curFrame.width)
+ else if ((stream->size() % _curFrame.length) == 0)
stream->seek(-2, SEEK_CUR);
}