aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/smush/smush_player.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2008-09-29 20:40:58 +0000
committerTorbjörn Andersson2008-09-29 20:40:58 +0000
commit8fc8531f70dbccb963823392ae923e89666839bb (patch)
tree1182a22a231dd0e6143a2fcba35c13ebd236c787 /engines/scumm/smush/smush_player.cpp
parent579b4b55c86c1933442f484bafb3fbb0a32e9a37 (diff)
downloadscummvm-rg350-8fc8531f70dbccb963823392ae923e89666839bb.tar.gz
scummvm-rg350-8fc8531f70dbccb963823392ae923e89666839bb.tar.bz2
scummvm-rg350-8fc8531f70dbccb963823392ae923e89666839bb.zip
Since no one has come up with any better suggestion... this should fix #2123258
("COMI: Crash after video (SAN) play"). The eos() function won't return true until we've tried to read *past* the end of the stream. svn-id: r34689
Diffstat (limited to 'engines/scumm/smush/smush_player.cpp')
-rw-r--r--engines/scumm/smush/smush_player.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp
index 6b79b7e2c4..3b17f3ae10 100644
--- a/engines/scumm/smush/smush_player.cpp
+++ b/engines/scumm/smush/smush_player.cpp
@@ -1017,16 +1017,17 @@ void SmushPlayer::parseNextFrame() {
}
assert(_base);
+
+ const uint32 subType = _base->readUint32BE();
+ const int32 subSize = _base->readUint32BE();
+ const int32 subOffset = _base->pos();
+
if (_base->eos()) {
_vm->_smushVideoShouldFinish = true;
_endOfFile = true;
return;
}
- const uint32 subType = _base->readUint32BE();
- const int32 subSize = _base->readUint32BE();
- const int32 subOffset = _base->pos();
-
switch (subType) {
case MKID_BE('AHDR'): // FT INSANE may seek file to the beginning
handleAnimHeader(subSize, *_base);