mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Bug 1005622 - Reset media queues in Android media seek so that we don't think we're still at EOS after playing to EOS and then seeking. r=edwin
This commit is contained in:
parent
24512f06f7
commit
bb55be4428
@ -1449,7 +1449,7 @@ void MediaDecoderStateMachine::Seek(const SeekTarget& aTarget)
|
||||
mSeekTarget = SeekTarget(seekTime, aTarget.mType);
|
||||
|
||||
mBasePosition = seekTime - mStartTime;
|
||||
DECODER_LOG(PR_LOG_DEBUG, "Changed state to SEEKING (to %ld)", mSeekTarget.mTime);
|
||||
DECODER_LOG(PR_LOG_DEBUG, "Changed state to SEEKING (to %lld)", mSeekTarget.mTime);
|
||||
mState = DECODER_STATE_SEEKING;
|
||||
if (mDecoder->GetDecodedStream()) {
|
||||
mDecoder->RecreateDecodedStream(seekTime - mStartTime);
|
||||
|
@ -323,8 +323,8 @@ nsresult MediaPluginReader::Seek(int64_t aTarget, int64_t aStartTime, int64_t aE
|
||||
{
|
||||
NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
|
||||
|
||||
mVideoQueue.Erase();
|
||||
mAudioQueue.Erase();
|
||||
mVideoQueue.Reset();
|
||||
mAudioQueue.Reset();
|
||||
|
||||
mAudioSeekTimeUs = mVideoSeekTimeUs = aTarget;
|
||||
|
||||
|
@ -248,7 +248,7 @@ nsresult RawReader::Seek(int64_t aTime, int64_t aStartTime, int64_t aEndTime, in
|
||||
nsresult rv = resource->Seek(nsISeekableStream::NS_SEEK_SET, offset.value());
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
mVideoQueue.Erase();
|
||||
mVideoQueue.Reset();
|
||||
|
||||
while(mVideoQueue.GetSize() == 0) {
|
||||
bool keyframeSkip = false;
|
||||
|
Loading…
Reference in New Issue
Block a user