зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1130913: Only create a new decoder if we have a new media segment. r=mattwoodrow
This commit is contained in:
Родитель
967797cbd8
Коммит
90b61d5576
|
@ -211,7 +211,7 @@ TrackBuffer::AppendData(LargeDataBuffer* aData, int64_t aTimestampOffset)
|
|||
}
|
||||
|
||||
if (gotMedia) {
|
||||
if (mLastEndTimestamp &&
|
||||
if (mParser->IsMediaSegmentPresent(aData) && mLastEndTimestamp &&
|
||||
(!mParser->TimestampsFuzzyEqual(start, mLastEndTimestamp.value()) ||
|
||||
mLastTimestampOffset != aTimestampOffset ||
|
||||
mDecoderPerSegment ||
|
||||
|
@ -256,11 +256,12 @@ TrackBuffer::AppendData(LargeDataBuffer* aData, int64_t aTimestampOffset)
|
|||
// We're going to have to wait for the decoder to initialize, the promise
|
||||
// will be resolved once initialization completes.
|
||||
return p;
|
||||
} else if (gotMedia) {
|
||||
// Tell our reader that we have more data to ensure that playback starts if
|
||||
// required when data is appended.
|
||||
mParentDecoder->GetReader()->MaybeNotifyHaveData();
|
||||
}
|
||||
|
||||
// Tell our reader that we have more data to ensure that playback starts if
|
||||
// required when data is appended.
|
||||
mParentDecoder->GetReader()->MaybeNotifyHaveData();
|
||||
|
||||
mInitializationPromise.Resolve(gotMedia, __func__);
|
||||
return p;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче