mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-10-31 22:58:51 +00:00
mccparse: Use the last known timecode as duration even if there were more invalid ones afterwards
This commit is contained in:
parent
38ecd43074
commit
a88fe95fee
1 changed files with 4 additions and 7 deletions
|
@ -722,13 +722,10 @@ impl MccParse {
|
|||
let state = self.state.lock().unwrap();
|
||||
let (framerate, drop_frame) = parse_timecode_rate(state.timecode_rate)
|
||||
.map_err(|_| loggable_error!(CAT, "Failed to parse timecode rate"))?;
|
||||
last_tc = match parse_timecode(framerate, drop_frame, tc) {
|
||||
Ok(mut timecode) => {
|
||||
/* We're looking for the total duration */
|
||||
timecode.increment_frame();
|
||||
Some(timecode)
|
||||
}
|
||||
Err(_) => None,
|
||||
if let Ok(mut timecode) = parse_timecode(framerate, drop_frame, tc) {
|
||||
/* We're looking for the total duration */
|
||||
timecode.increment_frame();
|
||||
last_tc = Some(timecode);
|
||||
}
|
||||
}
|
||||
/* We ignore everything else including errors */
|
||||
|
|
Loading…
Reference in a new issue