mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 02:35:41 +00:00
Bug 1309516 part 9 - make sure that MDSM::mDuration is always assigned once we have meatadata; r=jwwang
MozReview-Commit-ID: KF7J1XGo2MD --HG-- extra : rebase_source : a699ed11ad21aad9687c15fb3f3b37c4d56298ce
This commit is contained in:
parent
04d17fcd76
commit
0d5f209362
@ -1261,6 +1261,11 @@ DecodeMetadataState::OnMetadataRead(MetadataHolder* aMetadata)
|
||||
mMaster->RecomputeDuration();
|
||||
}
|
||||
|
||||
// If we don't know the duration by this point, we assume infinity, per spec.
|
||||
if (mMaster->mDuration.Ref().isNothing()) {
|
||||
mMaster->mDuration = Some(TimeUnit::FromInfinity());
|
||||
}
|
||||
|
||||
if (mMaster->HasVideo()) {
|
||||
SLOG("Video decode isAsync=%d HWAccel=%d videoQueueSize=%d",
|
||||
Reader()->IsAsync(),
|
||||
@ -2739,11 +2744,6 @@ MediaDecoderStateMachine::FinishDecodeFirstFrame()
|
||||
|
||||
mMediaSink->Redraw(Info().mVideo);
|
||||
|
||||
// If we don't know the duration by this point, we assume infinity, per spec.
|
||||
if (mDuration.Ref().isNothing()) {
|
||||
mDuration = Some(TimeUnit::FromInfinity());
|
||||
}
|
||||
|
||||
DECODER_LOG("Media duration %lld, "
|
||||
"transportSeekable=%d, mediaSeekable=%d",
|
||||
Duration().ToMicroseconds(), mResource->IsTransportSeekable(), mMediaSeekable);
|
||||
|
Loading…
Reference in New Issue
Block a user