aboutsummaryrefslogtreecommitdiff
path: root/video/avi_decoder.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2014-09-28 15:10:04 -0400
committerMatthew Hoops2014-09-28 15:29:42 -0400
commitb2676c412dc79af6c9f8d2ff423fcc95421eff97 (patch)
tree3890a73f94f794204077977c6a2162bca3116b45 /video/avi_decoder.cpp
parent690c6cc8d49293a295e56eeace9007450e5af14c (diff)
downloadscummvm-rg350-b2676c412dc79af6c9f8d2ff423fcc95421eff97.tar.gz
scummvm-rg350-b2676c412dc79af6c9f8d2ff423fcc95421eff97.tar.bz2
scummvm-rg350-b2676c412dc79af6c9f8d2ff423fcc95421eff97.zip
VIDEO: Fix seeking in AVI videos with no initial audio frames
Diffstat (limited to 'video/avi_decoder.cpp')
-rw-r--r--video/avi_decoder.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp
index 39deaea204..d9761e1c38 100644
--- a/video/avi_decoder.cpp
+++ b/video/avi_decoder.cpp
@@ -528,7 +528,10 @@ bool AVIDecoder::seekIntern(const Audio::Timestamp &time) {
// Recreate the audio stream
audioTrack->resetStream();
- uint framesNeeded = _header.initialFrames;
+ uint framesNeeded = _header.initialFrames;
+ if (framesNeeded == 0)
+ framesNeeded = 1;
+
uint startAudioChunk = 0;
int startAudioSearch = (lastRecord < 0) ? (frameIndex - 1) : (lastRecord - 1);