mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1130913: Only create a new decoder if we have a new media segment. r=mattwoodrow
This commit is contained in:
parent
fc55fd62a2
commit
b949dd90a8
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user