mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 09:18:42 +09:00
[webm] Don't reject seeks with EOS
The MediaDecoderStateMachine treat seek's EOS as fatal errors, so instead we always resolve the seek promise, and let the next GetSample return EOS.
This commit is contained in:
parent
64b9480493
commit
23c04adbe8
1 changed files with 4 additions and 0 deletions
|
|
@ -963,6 +963,10 @@ WebMTrackDemuxer::Seek(media::TimeUnit aTime)
|
|||
mParent->SeekInternal(mType, aTime);
|
||||
nsresult rv = mParent->GetNextPacket(mType, &mSamples);
|
||||
if (NS_FAILED(rv)) {
|
||||
if (rv == NS_ERROR_DOM_MEDIA_END_OF_STREAM) {
|
||||
// Ignore the error for now, the next GetSample will be rejected with EOS.
|
||||
return SeekPromise::CreateAndResolve(media::TimeUnit(), __func__);
|
||||
}
|
||||
return SeekPromise::CreateAndReject(rv, __func__);
|
||||
}
|
||||
mNeedKeyframe = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue