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 | 81c39ba87667566a83febdc8c22e300ea8313897 (patch) | |
tree | a6bfcedf41f5c3faf6cbe5b101830a10f903879b /dom | |
parent | 632b67483c9d964cd84ee90d162e88b510a70707 (diff) | |
download | UXP-81c39ba87667566a83febdc8c22e300ea8313897.tar UXP-81c39ba87667566a83febdc8c22e300ea8313897.tar.gz UXP-81c39ba87667566a83febdc8c22e300ea8313897.tar.lz UXP-81c39ba87667566a83febdc8c22e300ea8313897.tar.xz UXP-81c39ba87667566a83febdc8c22e300ea8313897.zip |
[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.
Diffstat (limited to 'dom')
-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; |