diff options
author | trav90 <travawine@palemoon.org> | 2018-10-08 21:44:23 -0500 |
---|---|---|
committer | trav90 <travawine@palemoon.org> | 2018-10-08 21:44:23 -0500 |
commit | 08fa25d5cdadcfca760843f963bfd56e53d7418d (patch) | |
tree | a6bfcedf41f5c3faf6cbe5b101830a10f903879b | |
parent | 93d7a8041cfb715e7b1f36ff887315e6a19ebfd4 (diff) | |
download | aura-central-08fa25d5cdadcfca760843f963bfd56e53d7418d.tar.gz |
[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.
-rw-r--r-- | dom/media/webm/WebMDemuxer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/dom/media/webm/WebMDemuxer.cpp b/dom/media/webm/WebMDemuxer.cpp index 395262a2e..b54739c06 100644 --- a/dom/media/webm/WebMDemuxer.cpp +++ b/dom/media/webm/WebMDemuxer.cpp @@ -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; |