VIDEO: improved how forceSeekToFrame handles videos when frame to seek is close to the start of the video

This commit is contained in:
neuromancer 2022-02-23 13:17:31 +01:00
parent f553afc502
commit ce7886ab67

View File

@ -428,12 +428,11 @@ bool SmackerDecoder::rewind() {
}
void SmackerDecoder::forceSeekToFrame(uint frame) {
if (frame < 10) {
rewind();
return;
}
const uint seekFrame = MAX<uint>(frame - 10, 0);
uint seekFrame;
if (frame >= 10)
seekFrame = MAX<uint>(frame - 10, 0);
else
seekFrame = 0;
if (!isVideoLoaded())
return;