aboutsummaryrefslogtreecommitdiff
path: root/video/qt_decoder.cpp
diff options
context:
space:
mode:
authorBastien Bouclet2017-08-18 09:32:24 +0200
committerBastien Bouclet2017-09-21 13:06:18 +0200
commit8547c89b86f0be02c4b3ef8e8adb4d5f96cf8432 (patch)
treedbe3fe398731a85a2d33440888613d87317397d8 /video/qt_decoder.cpp
parent9127f5245fe10bc9de8efea5a9050d980f3ef241 (diff)
downloadscummvm-rg350-8547c89b86f0be02c4b3ef8e8adb4d5f96cf8432.tar.gz
scummvm-rg350-8547c89b86f0be02c4b3ef8e8adb4d5f96cf8432.tar.bz2
scummvm-rg350-8547c89b86f0be02c4b3ef8e8adb4d5f96cf8432.zip
VIDEO: Change QT edit list to a Common::Array
And fix an out of bounds acces when seeking to the end of a video. Skipping samples is needed even when seeking through silent edits because a silent stream is queued for those. Fixes #10219.
Diffstat (limited to 'video/qt_decoder.cpp')
-rw-r--r--video/qt_decoder.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp
index f2acbb1282..70f0ae43da 100644
--- a/video/qt_decoder.cpp
+++ b/video/qt_decoder.cpp
@@ -507,7 +507,7 @@ bool QuickTimeDecoder::VideoTrackHandler::setReverse(bool reverse) {
_reversed = reverse;
if (_reversed) {
- if (_parent->editCount != 1) {
+ if (_parent->editList.size() != 1) {
// TODO: Myst's holo.mov needs this :(
warning("Can only set reverse without edits");
return false;
@@ -517,7 +517,7 @@ bool QuickTimeDecoder::VideoTrackHandler::setReverse(bool reverse) {
// If we're at the end of the video, go to the penultimate edit.
// The current frame is set to one beyond the last frame here;
// one "past" the currently displayed frame.
- _curEdit = _parent->editCount - 1;
+ _curEdit = _parent->editList.size() - 1;
_curFrame = _parent->frameCount;
_nextFrameStartTime = _parent->editList[_curEdit].trackDuration + _parent->editList[_curEdit].timeOffset;
} else if (_durationOverride >= 0) {
@@ -769,7 +769,7 @@ uint32 QuickTimeDecoder::VideoTrackHandler::getCurEditTrackDuration() const {
}
bool QuickTimeDecoder::VideoTrackHandler::atLastEdit() const {
- return _curEdit == _parent->editCount;
+ return _curEdit == _parent->editList.size();
}
bool QuickTimeDecoder::VideoTrackHandler::endOfCurEdit() const {