diff options
author | Bastien Bouclet | 2016-02-13 17:42:17 +0100 |
---|---|---|
committer | Bastien Bouclet | 2016-02-13 17:54:07 +0100 |
commit | 6d8eebbf7b7229c93b51e1f82c1cf980a4a7c79e (patch) | |
tree | 51493dbe8051e25a3946bc5d42eab11b7b3edfd0 /video/qt_decoder.cpp | |
parent | d1c0a1f8e5c2270b5812e5aa155d6e33f2b23bf0 (diff) | |
download | scummvm-rg350-6d8eebbf7b7229c93b51e1f82c1cf980a4a7c79e.tar.gz scummvm-rg350-6d8eebbf7b7229c93b51e1f82c1cf980a4a7c79e.tar.bz2 scummvm-rg350-6d8eebbf7b7229c93b51e1f82c1cf980a4a7c79e.zip |
VIDEO: Stay on the first edit when playing QT videos backwards
We don't support playing videos with multiple edits backwards. Taking the code
path to move to the next edit when playing backwards sets the current edit index
to an invalid value with the video still trying to play. Which results in out of
bounds reads, and ultimately a crash.
This fixes multiple crashes in Myst. Using the key without the chest on
Stoneship, resetting the clock tower puzzle, and using the switch in the trees
in Channelwood.
This was a regression introduced in a59f5db505ffce9567c3bc8adf30d2f843910d65.
Diffstat (limited to 'video/qt_decoder.cpp')
-rw-r--r-- | video/qt_decoder.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp index 324bf65294..49034aad17 100644 --- a/video/qt_decoder.cpp +++ b/video/qt_decoder.cpp @@ -447,7 +447,9 @@ const Graphics::Surface *QuickTimeDecoder::VideoTrackHandler::decodeNextFrame() } // Update the edit list, if applicable - if (endOfCurEdit()) { + // FIXME: Add support for playing backwards videos with more than one edit + // For now, stay on the first edit for reversed playback + if (endOfCurEdit() && !_reversed) { _curEdit++; if (atLastEdit()) |