mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1188238: [MSE] P1. Don't use Interval::Intersect to find the first frame of an interval. r=gerald
With H264, often the first frame of a media segment has no duration ; as such the time interval it represents is empty and will never intersect with anything.
This commit is contained in:
parent
592fd08ac6
commit
71c8c243cd
@ -1598,10 +1598,8 @@ TrackBuffersManager::CheckNextInsertionIndex(TrackData& aTrackData,
|
||||
}
|
||||
for (uint32_t i = 0; i < data.Length(); i++) {
|
||||
const nsRefPtr<MediaRawData>& sample = data[i];
|
||||
TimeInterval sampleInterval{
|
||||
TimeUnit::FromMicroseconds(sample->mTime),
|
||||
TimeUnit::FromMicroseconds(sample->GetEndTime())};
|
||||
if (target.Intersects(sampleInterval)) {
|
||||
if (sample->mTime >= target.mStart.ToMicroseconds() ||
|
||||
sample->GetEndTime() > target.mStart.ToMicroseconds()) {
|
||||
aTrackData.mNextInsertionIndex = Some(size_t(i));
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user