mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1261312 - Make sure that audio/video decode task is filed again. r=jwwang
The idea is that we can call Ensure{Audio/Video}DecodeTaskQueued() directly since the conditions in the DispatchDecodeTasksIfNeeded() have already been checked. MozReview-Commit-ID: 9xataQiuSIx --HG-- extra : transplant_source : %E4t%20%1FV%12%FE%08%9Cx%D7%0A%C3C%B0M%14%80%E4%85
This commit is contained in:
parent
89ac1fb7b9
commit
fef7021219
@ -785,7 +785,11 @@ MediaDecoderStateMachine::OnNotDecoded(MediaData::Type aType,
|
||||
->Then(OwnerThread(), __func__,
|
||||
[self] (MediaData::Type aType) -> void {
|
||||
self->WaitRequestRef(aType).Complete();
|
||||
self->DispatchDecodeTasksIfNeeded();
|
||||
if (aType == MediaData::AUDIO_DATA) {
|
||||
self->EnsureAudioDecodeTaskQueued();
|
||||
} else {
|
||||
self->EnsureVideoDecodeTaskQueued();
|
||||
}
|
||||
},
|
||||
[self] (WaitForDataRejectValue aRejection) -> void {
|
||||
self->WaitRequestRef(aRejection.mType).Complete();
|
||||
@ -806,7 +810,11 @@ MediaDecoderStateMachine::OnNotDecoded(MediaData::Type aType,
|
||||
}
|
||||
|
||||
if (aReason == MediaDecoderReader::CANCELED) {
|
||||
DispatchDecodeTasksIfNeeded();
|
||||
if (isAudio) {
|
||||
EnsureAudioDecodeTaskQueued();
|
||||
} else {
|
||||
EnsureVideoDecodeTaskQueued();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user