Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(rendering): keep the decode stall when the software fallback cannot start

Richie McIlroy115a1eee2a31
diff --git a/crates/rendering/src/decoder/mod.rs b/crates/rendering/src/decoder/mod.rs
index 1d93e0a16..67ed38fef 100644
--- a/crates/rendering/src/decoder/mod.rs
+++ b/crates/rendering/src/decoder/mod.rs
@@ -849,10 +849,10 @@ impl AsyncVideoDecoderHandle {
Err(_) => Ok(None),
};
}
- if let Ok(Some(frame)) = self
+ let primary = self
.request_frame(time, timeout_ms, max_fallback_distance, deadline)
- .await
- {
+ .await;
+ if let Ok(Some(frame)) = primary {
return Ok(Some(frame));
}
let result = fallback
@@ -884,7 +884,7 @@ impl AsyncVideoDecoderHandle {
}
Err(error) => {
tracing::warn!(%error, "Software video decoder fallback failed");
- Ok(None)
+ primary
}
};
}