Karl Tomlinson ceca6ef3b0 Bug 1916305 Remove microsecond rounding of appendWindowStart and appendWindowEnd r=alwu
Whether a sample is fully contained is calculated using double precision
representations as specified and the append window values precisely as
provided.

The optional inclusion of a truncated frame overlapping the append window is
determined by TimeUnit arithmetic with the same base/denominator as the frame
duration, so as to skip the frame if the intersection duration would be zero.

FromSeconds() rounds to nearest and so the end time of the truncated frame is
now rounded to the nearest point at timescale resolution.
ToBase<RoundingPolicy> defaulted to TruncatePolicy and so would truncate even
when the double precision appendWindowEnd was intended align with the frame
end.

Zero duration frames can confuse buffered range accounting (bug 1849216).
This patch removes an unnecessary source of zero duration frames.

Differential Revision: https://phabricator.services.mozilla.com/D229055
2024-11-21 23:22:34 +00:00
..