Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(recording): exit macOS MP4 encoder workers on QueueFrameError::Finished

Richie McIlroy47a3ca60601f
diff --git a/crates/recording/src/output_pipeline/macos.rs b/crates/recording/src/output_pipeline/macos.rs
index 5c8911ed3..3179726b8 100644
--- a/crates/recording/src/output_pipeline/macos.rs
+++ b/crates/recording/src/output_pipeline/macos.rs
@@ -388,6 +388,7 @@ impl Muxer for AVFoundationMp4Muxer {
set_fatal_error(&video_fatal_error, message.clone());
return Err(anyhow!(message));
}
+ Err(QueueFrameError::Finished) => return Ok(()),
Err(e) => {
warn!("Failed to encode video frame: {e}");
break;
@@ -510,6 +511,7 @@ impl Muxer for AVFoundationMp4Muxer {
set_fatal_error(&audio_fatal_error, message.clone());
return Err(anyhow!(message));
}
+ Err(QueueFrameError::Finished) => return Ok(()),
Err(e) => {
warn!("Failed to encode audio frame: {e}");
break;
@@ -874,6 +876,7 @@ impl Muxer for AVFoundationCameraMuxer {
set_fatal_error(&video_fatal_error, message.clone());
return Err(anyhow!(message));
}
+ Err(QueueFrameError::Finished) => return Ok(()),
Err(e) => {
warn!("Failed to encode camera frame: {e}");
break;