aboutsummaryrefslogtreecommitdiff
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/avi_decoder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp
index c2c485c1eb..32aa9f9044 100644
--- a/video/avi_decoder.cpp
+++ b/video/avi_decoder.cpp
@@ -726,7 +726,7 @@ bool AVIDecoder::seekIntern(const Audio::Timestamp &time) {
OldIndex *entry = nullptr;
do {
entry = _indexEntries.find(_videoTracks.back().index, indexFrame);
- } while (!entry && --indexFrame >= 0);
+ } while (!entry && indexFrame-- > 0);
assert(entry);
// Read in the frame
@@ -740,7 +740,7 @@ bool AVIDecoder::seekIntern(const Audio::Timestamp &time) {
if (indexFrame < frame) {
TrackStatus &status = _videoTracks.back();
- while (indexFrame++ < frame) {
+ while (status.chunkSearchOffset < _movieListEnd && indexFrame++ < frame) {
// There was no index entry for the desired frame, so an earlier one was decoded.
// We now have to sequentially decode frames until we get to the desired frame
handleNextPacket(status);