diff --git a/src-tauri/src/capture.rs b/src-tauri/src/capture.rs index 166724c..a6d2e98 100644 --- a/src-tauri/src/capture.rs +++ b/src-tauri/src/capture.rs @@ -566,6 +566,10 @@ fn monitor_at_point(x: i32, y: i32) -> Result { Ok(Monitor::from_raw_hmonitor(hmonitor.0)) } +#[allow( + clippy::expect_used, + reason = "Windows always has a primary monitor; if enumeration fails there is nothing sensible to capture instead" +)] pub(crate) fn start( output_path: PathBuf, ffmpeg_path: PathBuf, @@ -693,6 +697,10 @@ impl CaptureSession { /// Idempotent: if `input` has already been consumed (e.g. a previous /// pause/resume cycle ran this to completion and removed it), and /// `output` exists, returns Ok without re-running ffmpeg. +#[allow( + clippy::expect_used, + reason = "callers rule out the None case that capture_timing returns None for" +)] pub(crate) fn fix_intermediate_fps( ffmpeg: &std::path::Path, input: &std::path::Path, diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 00d03a1..89010c6 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -774,11 +774,13 @@ fn stop_capture(app: AppHandle, state: State<'_, AppState>) -> Result) -> Result 0.001 { pad_audio_head( &audio_concat, - ss.audio_sample_rate.unwrap(), - ss.audio_channels.unwrap(), + sample_rate, + channels, head_offset_secs, ) .map_err(|e| format!("padding audio head: {e:#}"))?; @@ -804,8 +806,8 @@ fn stop_capture(app: AppHandle, state: State<'_, AppState>) -> Result) -> Result