From c76c0522591004d3e79a4990099ca2122a6414d9 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Fri, 29 Jun 2018 07:19:41 +0200 Subject: VIDEO: Fix seeking the the last frame of QT videos while playing backwards Fixes Trac#10590. --- video/qt_decoder.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'video') diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp index 70f0ae43da..4786e61227 100644 --- a/video/qt_decoder.cpp +++ b/video/qt_decoder.cpp @@ -326,8 +326,12 @@ bool QuickTimeDecoder::VideoTrackHandler::seek(const Audio::Timestamp &requested break; // If we did reach the end of the track, break out - if (atLastEdit()) + if (atLastEdit()) { + // Call setReverse to set the position to the last frame of the last edit + if (_reversed) + setReverse(true); return true; + } // If this track is in an empty edit, position us at the next non-empty // edit. There's nothing else to do after this. @@ -344,8 +348,12 @@ bool QuickTimeDecoder::VideoTrackHandler::seek(const Audio::Timestamp &requested enterNewEditList(false); // One extra check for the end of a track - if (atLastEdit()) + if (atLastEdit()) { + // Call setReverse to set the position to the last frame of the last edit + if (_reversed) + setReverse(true); return true; + } // Now we're in the edit and need to figure out what frame we need Audio::Timestamp time = requestedTime.convertToFramerate(_parent->timeScale); -- cgit v1.2.3