Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
Ignore placeholder macOS device IDs; clamp end time
Richie McIlroydd00f27f3c7a
diff --git a/crates/camera/src/macos.rs b/crates/camera/src/macos.rsindex 6a8902445..d934a8b64 100644--- a/crates/camera/src/macos.rs+++ b/crates/camera/src/macos.rs@@ -62,6 +62,10 @@ impl ModelID {let vid = unique_id[unique_id.len() - 2 * 4..unique_id.len() - 4].to_string();let pid = unique_id[unique_id.len() - 4..].to_string();+ if vid == "0000" && pid == "0001" {+ return None;+ }+Some(Self { vid, pid })}}diff --git a/crates/enc-avfoundation/src/mp4.rs b/crates/enc-avfoundation/src/mp4.rsindex 666cd89d0..5ae0bd959 100644--- a/crates/enc-avfoundation/src/mp4.rs+++ b/crates/enc-avfoundation/src/mp4.rs@@ -602,6 +602,11 @@ impl MP4Encoder {let mut end_session_time = end_timestamp.saturating_sub(self.timestamp_offset);+ if let Some(last_video_pts) = self.last_video_pts {+ let min_video_end = last_video_pts.saturating_add(self.video_frame_duration());+ end_session_time = end_session_time.max(min_video_end);+ }+if let Some(audio_end_pts) = self.last_audio_end_pts&& let Some(timescale) = self.last_audio_timescale&& timescale > 0