Skip to content

Commit 344956b

Browse files
committed
coderabbit
1 parent 1993e73 commit 344956b

File tree

7 files changed

+17
-8
lines changed

7 files changed

+17
-8
lines changed

.claude/settings.local.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@
4848
"Bash(powershell -Command \"[System.Environment]::OSVersion.Version.ToString()\")",
4949
"Bash(cargo build:*)",
5050
"Bash(gh api:*)",
51-
"Bash(curl:*)"
51+
"Bash(curl:*)",
52+
"Bash(node -e:*)",
53+
"Bash(findstr:*)"
5254
],
5355
"deny": [],
5456
"ask": []

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/desktop/src-tauri/src/general_settings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ pub struct GeneralSettingsStore {
123123
pub instant_mode_max_resolution: u32,
124124
#[serde(default)]
125125
pub default_project_name_template: Option<String>,
126-
#[serde(default = "default_true")]
126+
#[serde(default)]
127127
pub crash_recovery_recording: bool,
128128
}
129129

crates/enc-mediafoundation/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ edition = "2024"
77
cap-media-info = { path = "../media-info" }
88
futures.workspace = true
99
thiserror.workspace = true
10+
tracing.workspace = true
1011
workspace-hack = { version = "0.1", path = "../workspace-hack" }
1112

1213
[target.'cfg(windows)'.dependencies]

crates/enc-mediafoundation/src/video/hevc.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,10 +427,7 @@ impl HevcEncoder {
427427
}
428428
}
429429
_ => {
430-
eprintln!(
431-
"[cap-enc-mediafoundation] Ignoring unknown media event type: {}",
432-
event_type.0
433-
);
430+
tracing::warn!("Ignoring unknown media event type: {}", event_type.0);
434431
}
435432
}
436433
}

crates/recording/src/output_pipeline/win.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,10 @@ impl Muxer for WindowsMuxer {
285285
Ok(Some((frame.texture().clone(), frame_time)))
286286
},
287287
|output_sample| {
288-
let mut output = output.lock().unwrap();
288+
let Ok(mut output) = output.lock() else {
289+
tracing::error!("Failed to lock output mutex - poisoned");
290+
return Ok(());
291+
};
289292

290293
if let Err(e) = muxer.write_sample(&output_sample, &mut output) {
291294
tracing::error!("WriteSample failed: {e}");

crates/recording/src/output_pipeline/win_segmented_camera.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,12 @@ impl WindowsSegmentedCameraMuxer {
516516
Ok(Some((texture, duration_to_timespan(relative))))
517517
},
518518
|output_sample| {
519-
let mut output = output_clone.lock().unwrap();
519+
let mut output = output_clone.lock().map_err(|e| {
520+
windows::core::Error::new(
521+
windows::core::HRESULT(-1),
522+
format!("Mutex poisoned: {e}"),
523+
)
524+
})?;
520525
muxer
521526
.write_sample(&output_sample, &mut output)
522527
.map_err(|e| {

0 commit comments

Comments
 (0)