[Scummvm-git-logs] scummvm master -> be208264dd2025f0034d0848b21d2652b164f153
dreammaster
dreammaster at scummvm.org
Mon Sep 4 18:03:42 CEST 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
be208264dd VIDEO: Fix reverse playback right to the very start of the video
Commit: be208264dd2025f0034d0848b21d2652b164f153
https://github.com/scummvm/scummvm/commit/be208264dd2025f0034d0848b21d2652b164f153
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-09-04T12:03:34-04:00
Commit Message:
VIDEO: Fix reverse playback right to the very start of the video
Changed paths:
video/avi_decoder.cpp
diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp
index ea10b95..7d18293 100644
--- a/video/avi_decoder.cpp
+++ b/video/avi_decoder.cpp
@@ -132,7 +132,7 @@ bool AVIDecoder::isSeekable() const {
const Graphics::Surface *AVIDecoder::decodeNextFrame() {
AVIVideoTrack *track = nullptr;
bool isReversed = false;
- int frameNum;
+ int frameNum = 0;
// Check whether the video is playing in revese
for (int idx = _videoTracks.size() - 1; idx >= 0; --idx) {
@@ -155,6 +155,7 @@ const Graphics::Surface *AVIDecoder::decodeNextFrame() {
for (int idx = _videoTracks.size() - 1; idx >= 0; --idx) {
track = static_cast<AVIVideoTrack *>(_videoTracks[idx].track);
track->setCurFrame(frameNum - 1);
+ findNextVideoTrack();
}
}
@@ -1020,7 +1021,7 @@ bool AVIDecoder::AVIVideoTrack::setReverse(bool reverse) {
bool AVIDecoder::AVIVideoTrack::endOfTrack() const {
if (_reversed)
- return _curFrame < 0;
+ return _curFrame < -1;
return _curFrame >= (getFrameCount() - 1);
}
More information about the Scummvm-git-logs
mailing list