mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1065855 - Check for waiting media resources before calling ReadMetadata - r=cpearce
--HG-- extra : rebase_source : 45022c3d553e82e098908af7682cf241593b57f9
This commit is contained in:
parent
8b7ea8cf50
commit
ff897a2a2b
@ -1911,6 +1911,11 @@ nsresult MediaDecoderStateMachine::DecodeMetadata()
|
||||
MOZ_ASSERT(mState == DECODER_STATE_DECODING_METADATA);
|
||||
DECODER_LOG("Decoding Media Headers");
|
||||
|
||||
if (mReader->IsWaitingMediaResources()) {
|
||||
StartWaitForResources();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult res;
|
||||
MediaInfo info;
|
||||
{
|
||||
|
@ -470,14 +470,10 @@ MediaSourceReader::Seek(int64_t aTime, int64_t aStartTime, int64_t aEndTime,
|
||||
nsresult
|
||||
MediaSourceReader::ReadMetadata(MediaInfo* aInfo, MetadataTags** aTags)
|
||||
{
|
||||
bool waiting = IsWaitingMediaResources();
|
||||
MSE_DEBUG("MediaSourceReader(%p)::ReadMetadata waiting=%d tracks=%u/%u audio=%p video=%p",
|
||||
this, waiting, mEssentialTrackBuffers.Length(), mTrackBuffers.Length(),
|
||||
MSE_DEBUG("MediaSourceReader(%p)::ReadMetadata tracks=%u/%u audio=%p video=%p",
|
||||
this, mEssentialTrackBuffers.Length(), mTrackBuffers.Length(),
|
||||
mAudioTrack.get(), mVideoTrack.get());
|
||||
// ReadMetadata is called *before* checking IsWaitingMediaResources.
|
||||
if (waiting) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
mEssentialTrackBuffers.Clear();
|
||||
if (!mAudioTrack && !mVideoTrack) {
|
||||
MSE_DEBUG("MediaSourceReader(%p)::ReadMetadata missing track: mAudioTrack=%p mVideoTrack=%p",
|
||||
|
Loading…
Reference in New Issue
Block a user