Address feedback from PR.

This commit is contained in:
robin 2024-10-03 10:18:12 -04:00
parent a3c9106f35
commit 412b4b8d3a

View file

@ -293,10 +293,13 @@ def get_media_range_with_retimes(otio_clip, handle_start, handle_end):
# to preserve media range
# Compute new source range based on available rate.
# Backward-compatibility for Hiero OTIO exporter.
# NTSC compatibility might introduce floating rates, when these are
# not exactly the same (23.976 vs 23.976024627685547)
# this will cause precision issue in computation.
# Round to 2 decimals for comparison.
# Currently round to 2 decimals for comparison,
# but this should always rescale after that.
rounded_av_rate = round(available_range_rate, 2)
rounded_src_rate = round(source_range.start_time.rate, 2)
if rounded_av_rate != rounded_src_rate: