Skip to content

Commit 363be12

Browse files
hisergiorojasSergio Rojas
andauthored
Check rate and value are not invalid (#867)
Co-authored-by: Sergio Rojas <[email protected]>
1 parent 3176882 commit 363be12

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/opentime/rationalTime.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ class RationalTime {
2323
RationalTime& operator= (RationalTime const&) = default;
2424

2525
bool is_invalid_time() const {
26+
if(std::isnan(_rate) || std::isnan(_value)) {
27+
return true;
28+
}
29+
2630
return _rate <= 0;
2731
}
2832

0 commit comments

Comments
 (0)