From 8547c89b86f0be02c4b3ef8e8adb4d5f96cf8432 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Fri, 18 Aug 2017 09:32:24 +0200 Subject: 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. --- video/qt_decoder.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'video') 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 { -- cgit v1.2.3