diff --git a/src/system.rs b/src/system.rs index 5c6f142..77a1aa0 100644 --- a/src/system.rs +++ b/src/system.rs @@ -45,17 +45,10 @@ pub fn calculate_target_time(frame: &LtcFrame, config: &Config) -> DateTime 25000 { 30 } else { 24 }; // 30 for 29.97, 24 for 23.98 - let total_frames = timecode_secs * nominal_rate + frame.frames as i64; - Ratio::new(total_frames, 1) / frame.frame_rate - } else { - Ratio::new(timecode_secs, 1) + Ratio::new(frame.frames as i64, 1) / frame.frame_rate - }; + // Timecode is always treated as wall-clock time. NDF scaling is not applied + // as the LTC source appears to be pre-compensated. + let total_duration_secs = + Ratio::new(timecode_secs, 1) + Ratio::new(frame.frames as i64, 1) / frame.frame_rate; // Convert to milliseconds let total_ms = (total_duration_secs * Ratio::new(1000, 1))