Skip to content

Commit 4d4704e

Browse files
committed
Add higher framerates to list of valid options
1 parent 8b40ebb commit 4d4704e

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/opentime/rationalTime.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,18 @@ static constexpr std::array<double, 11> smpte_timecode_rates{
3333
50.0,
3434
60000.0 / 1001.0,
3535
60.0
36+
72.0
37+
72000.0 / 1001.0,
38+
96.0
39+
96000.0 / 1001.0,
40+
120.0
41+
120000.0 / 1001.0,
42+
144.0
43+
144000.0 / 1001.0,
44+
192.0
45+
192000.0 / 1001.0,
46+
240.0
47+
240000.0 / 1001.0,
3648
}
3749
};
3850

@@ -458,7 +470,8 @@ RationalTime::to_timecode(
458470
// so as a convenience we will snap the rate to the nearest
459471
// SMPTE rate if it is close enough.
460472
double nearest_smpte_rate = nearest_smpte_timecode_rate(rate);
461-
if (abs(nearest_smpte_rate - rate) > 0.1)
473+
double error_margin = nearest_smpte_rate * 0.002
474+
if (abs(nearest_smpte_rate - rate) > error_margin)
462475
{
463476
if (error_status)
464477
{

0 commit comments

Comments
 (0)