Bug 1101742 - Fix OmxDecoder::mIsVideoSeeking r= cajbir

This commit is contained in:
Sotaro Ikeda 2014-11-20 06:34:16 -08:00
parent 1359da3949
commit 5b6033771f

View File

@ -582,20 +582,24 @@ bool OmxDecoder::ReadVideo(VideoFrame *aFrame, int64_t aTimeUs,
}
// If there is no next Keyframe, jump to the previous key frame.
if (err == ERROR_END_OF_STREAM && seekMode == MediaSource::ReadOptions::SEEK_NEXT_SYNC) {
seekMode = MediaSource::ReadOptions::SEEK_PREVIOUS_SYNC;
findNextBuffer = true;
{
Mutex::Autolock autoLock(mSeekLock);
mIsVideoSeeking = true;
}
continue;
seekMode = MediaSource::ReadOptions::SEEK_PREVIOUS_SYNC;
findNextBuffer = true;
{
Mutex::Autolock autoLock(mSeekLock);
mIsVideoSeeking = true;
}
continue;
} else if (err != OK) {
ALOG("Unexpected error when seeking to %lld", aTimeUs);
ALOG("Unexpected error when seeking to %lld", aTimeUs);
break;
}
if (mVideoBuffer->range_length() == 0) {
ReleaseVideoBuffer();
findNextBuffer = true;
findNextBuffer = true;
{
Mutex::Autolock autoLock(mSeekLock);
mIsVideoSeeking = true;
}
}
}
aDoSeek = false;