BINK: Fix #863, seeking to frame 0 triggers an assertion

It would create and use a negative (invalid) Audio::TimeStamp
This commit is contained in:
Bastien Bouclet 2014-05-01 07:35:19 +02:00
parent 51e9f5be3f
commit 97ef97841c

View File

@ -344,6 +344,11 @@ bool BinkDecoder::seekIntern(const Audio::Timestamp &time) {
// Adjust the video track to use for seeking
findNextVideoTrack();
if (frame == keyFrame) {
// We're already good, no need to go further
return true;
}
while (getCurFrame() < (int32)frame - 1)
decodeNextFrame();