Bug 1362165: P7. Only complete appendBuffer once readyState has changed. r=jwwang
MSE specs require that the readyState be modified during either the Initialization Segment Received or the Coded Frame Processing algorithms. At this stage, we only handle the Initialization Segment part (readyState moving from HAVE_NOTHING to HAVE_METADATA) MozReview-Commit-ID: KBnnWuHJ6Om
This commit is contained in:
@@ -1658,6 +1658,9 @@ void HTMLMediaElement::ShutdownDecoder()
|
||||
RemoveMediaElementFromURITable();
|
||||
NS_ASSERTION(mDecoder, "Must have decoder to shut down");
|
||||
mWaitingForKeyListener.DisconnectIfExists();
|
||||
if (mMediaSource) {
|
||||
mMediaSource->CompletePendingTransactions();
|
||||
}
|
||||
mDecoder->Shutdown();
|
||||
mDecoder = nullptr;
|
||||
}
|
||||
@@ -5583,6 +5586,12 @@ HTMLMediaElement::UpdateReadyStateInternal()
|
||||
MetadataLoaded(&mediaInfo, nsAutoPtr<const MetadataTags>(nullptr));
|
||||
}
|
||||
|
||||
if (mMediaSource) {
|
||||
// readyState has changed, assuming it's following the pending mediasource
|
||||
// operations. Notify the Mediasource that the operations have completed.
|
||||
mMediaSource->CompletePendingTransactions();
|
||||
}
|
||||
|
||||
enum NextFrameStatus nextFrameStatus = NextFrameStatus();
|
||||
if (nextFrameStatus == NEXT_FRAME_UNAVAILABLE ||
|
||||
(nextFrameStatus == NEXT_FRAME_UNAVAILABLE_BUFFERING &&
|
||||
|
||||
Reference in New Issue
Block a user