зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1245463: [MSE] P1. Do not attempt to retrieve the buffered range if the mediasource is in closed state. r=gerald
The changes that follow may cause the active sourcebuffer list to be modified; which will trigger an assertion if the mediasource object is closed. MozReview-Commit-ID: 8A1CMKAUyTq
This commit is contained in:
Родитель
bf2ce4db2f
Коммит
aceca098dd
|
@ -256,6 +256,12 @@ MediaDecoderOwner::NextFrameStatus
|
|||
MediaSourceDecoder::NextFrameBufferedStatus()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (!mMediaSource ||
|
||||
mMediaSource->ReadyState() == dom::MediaSourceReadyState::Closed) {
|
||||
return MediaDecoderOwner::NEXT_FRAME_UNAVAILABLE;
|
||||
}
|
||||
|
||||
// Next frame hasn't been decoded yet.
|
||||
// Use the buffered range to consider if we have the next frame available.
|
||||
TimeUnit currentPosition = TimeUnit::FromMicroseconds(CurrentPosition());
|
||||
|
|
Загрузка…
Ссылка в новой задаче