mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-21 09:49:14 +00:00

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