Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix: ensure screenshot always receives NV12 data

Cursor Agent182d5ec4ee21
diff --git a/crates/export/src/mp4.rs b/crates/export/src/mp4.rs
index 5b4017340..8236737a7 100644
--- a/crates/export/src/mp4.rs
+++ b/crates/export/src/mp4.rs
@@ -246,12 +246,14 @@ impl Mp4ExportSettings {
return Err("Export cancelled".to_string());
}
+ let nv12_data = ensure_nv12_data(frame);
+
if frame_count == 0 {
first_frame_data = Some(FirstFrameNv12 {
- data: frame.data.clone(),
- width: frame.width,
- height: frame.height,
- y_stride: frame.y_stride,
+ data: nv12_data.clone(),
+ width: output_size.0,
+ height: output_size.1,
+ y_stride: output_size.0,
});
if let Some(audio) = &mut audio_renderer {
audio.set_playhead(0.0, &project);
@@ -273,8 +275,6 @@ impl Mp4ExportSettings {
})
});
- let nv12_data = ensure_nv12_data(frame);
-
if frame_tx
.send(Nv12ExportFrame {
audio: audio_frame,