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
4544540d27
commit
3e080a3d22
@ -1598,10 +1598,8 @@ TrackBuffersManager::CheckNextInsertionIndex(TrackData& aTrackData,
|
|||||||
}
|
}
|
||||||
for (uint32_t i = 0; i < data.Length(); i++) {
|
for (uint32_t i = 0; i < data.Length(); i++) {
|
||||||
const nsRefPtr<MediaRawData>& sample = data[i];
|
const nsRefPtr<MediaRawData>& sample = data[i];
|
||||||
TimeInterval sampleInterval{
|
if (sample->mTime >= target.mStart.ToMicroseconds() ||
|
||||||
TimeUnit::FromMicroseconds(sample->mTime),
|
sample->GetEndTime() > target.mStart.ToMicroseconds()) {
|
||||||
TimeUnit::FromMicroseconds(sample->GetEndTime())};
|
|
||||||
if (target.Intersects(sampleInterval)) {
|
|
||||||
aTrackData.mNextInsertionIndex = Some(size_t(i));
|
aTrackData.mNextInsertionIndex = Some(size_t(i));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user