Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(recording): detect skipped video frames only on macOS capture timestamps

Richie McIlroy962f99f1a6d2
diff --git a/crates/recording/src/output_pipeline/core.rs b/crates/recording/src/output_pipeline/core.rs
index f5f79b7c1..0a4359477 100644
--- a/crates/recording/src/output_pipeline/core.rs
+++ b/crates/recording/src/output_pipeline/core.rs
@@ -2955,7 +2955,10 @@ fn spawn_video_encoder<TMutex: VideoMuxer<VideoFrame = TVideo::Frame>, TVideo: V
let mut frame_count = 0u64;
let mut anomaly_tracker = TimestampAnomalyTracker::new("video");
let mut drift_tracker = VideoDriftTracker::new();
- let mut source_clock = SourceClockState::new("video").detecting_skipped_frames();
+ let source_clock = SourceClockState::new("video");
+ #[cfg(target_os = "macos")]
+ let source_clock = source_clock.detecting_skipped_frames();
+ let mut source_clock = source_clock;
let mut dropped_during_pause: u64 = 0;
let mut last_frame = None;
let mut first_frame_offset = None;