mirror of
https://github.com/samsonjs/media.git
synced 2026-04-02 10:45:51 +00:00
This is equivalent to the existing `scaleLargeTimestamp` method with the
following changes/improvements:
* No longer specific to timestamps (there was nothing inherently
time-specific about the logic in `scaleLargeTimestamp`, but the name
and docs suggested it shouldn't be used for non-timestamp use-cases).
* Additional 'perfect division' checks between `value` and `divisor`.
* The caller can now provide a `RoundingMode`.
* Robust against `multiplier == 0`.
* Some extra branches before falling through to (potentially lossy)
floating-point math, including trying to simplify the fraction with
greatest common divisor to reduce the chance of overflowing `long`.
This was discussed during review of
|
||
|---|---|---|
| .. | ||
| midroll-5s.mp4.dump | ||
| postroll-5s.mp4.dump | ||
| preroll-5s.mp4.dump | ||
| sample.mp4.dump | ||
| sample_ac3.mp4.dump | ||
| sample_ac3_fragmented.mp4.dump | ||
| sample_ac4.mp4.dump | ||
| sample_ac4_fragmented.mp4.dump | ||
| sample_android_slow_motion.mp4.dump | ||
| sample_eac3.mp4.dump | ||
| sample_eac3_fragmented.mp4.dump | ||
| sample_eac3joc.mp4.dump | ||
| sample_eac3joc_fragmented.mp4.dump | ||
| sample_fragmented.mp4.dump | ||
| sample_fragmented_large_bitrates.mp4.dump | ||
| sample_fragmented_seekable.mp4.dump | ||
| sample_fragmented_sei.mp4.dump | ||
| sample_mdat_too_long.mp4.dump | ||
| sample_opus.mp4.dump | ||
| sample_opus_fragmented.mp4.dump | ||
| sample_partially_fragmented.mp4.dump | ||
| ssai-extended-adgroup.mp4.dump | ||
| ssai-newly-inserted-adgroup.mp4.dump | ||
| ssai-predefined-ads.mp4.dump | ||
| testvid_1022ms.mp4.dump | ||