From c24546dd26403c4da24619d65feded526f3c4266 Mon Sep 17 00:00:00 2001 From: selikhov Date: Sat, 3 Oct 2026 11:47:20 +0300 Subject: [PATCH] voelin-core: drop the frame a failed GPU conversion leaves behind When a conversion failed, the sink had already counted the frame and taken its layers' pacing, then declined it: the portal mapped it, the CPU path counted it a second time and found no layer due. Drop that one frame instead; the next one takes the CPU path. Co-Authored-By: Claude Opus 5.5 --- crates/voelin-core/src/media.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/voelin-core/src/media.rs b/crates/voelin-core/src/media.rs index b1232b8..8350064 100644 --- a/crates/voelin-core/src/media.rs +++ b/crates/voelin-core/src/media.rs @@ -1644,7 +1644,9 @@ impl Ingest { *lock(&shared.gpu_error) = Some(e.to_string()); self.gpu.converter = Some(Err(())); self.gpu.out.clear(); - return None; + // This frame is counted and its layers' pacing taken: it is + // dropped, and the next one takes the CPU path. + return Some(true); } shared.gpu_convert_ns.fetch_add(started.elapsed().as_nanos() as u64, Ordering::Relaxed); shared.gpu_converted.fetch_add(1, Ordering::Relaxed);