@@ -132,8 +132,7 @@ namespace opentrackio::opentrackiotypes
132132 struct Format
133133 {
134134 Rational frameRate{};
135- bool dropFrame = false ;
136- std::optional<bool > oddField = std::nullopt ;
135+ std::optional<int > subFrame = std::nullopt ;
137136 };
138137 Format format{};
139138
@@ -164,7 +163,6 @@ namespace opentrackio::opentrackiotypes
164163
165164 const bool formatFieldValid =
166165 tcJson[" format" ].contains (" frameRate" ) &&
167- tcJson[" format" ].contains (" dropFrame" ) &&
168166 tcJson[" format" ][" frameRate" ].contains (" num" ) &&
169167 tcJson[" format" ][" frameRate" ].contains (" denom" );
170168
@@ -175,23 +173,16 @@ namespace opentrackio::opentrackiotypes
175173 }
176174
177175 auto fr = Rational::parse (tcJson[" format" ], " frameRate" , errors);
178- bool drop;
179- std::optional<bool > odd;
180-
181- if (!OpenTrackIOHelpers::checkTypeAndSetField (tcJson[" format" ][" dropFrame" ], drop))
182- {
183- errors.emplace_back (" field: timing/timecode/format/dropFrame isn't of type: bool" );
184- return std::nullopt ;
185- }
176+ std::optional<int > sub;
186177
187178 if (!fr.has_value ())
188179 {
189180 return std::nullopt ;
190181 }
191182
192- OpenTrackIOHelpers::assignField (tcJson[" format" ], " oddField " , odd , " bool " , errors);
183+ OpenTrackIOHelpers::assignField (tcJson[" format" ], " subFrame " , sub , " int " , errors);
193184
194- return Timecode{hours.value (), minutes.value (), seconds.value (), frames.value (), Format{fr.value (), drop, odd }};
185+ return Timecode{hours.value (), minutes.value (), seconds.value (), frames.value (), Format{fr.value (), sub }};
195186 }
196187 };
197188
0 commit comments