From 17a2448237d752d9b83358697eed16f02299c40e Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Wed, 25 Oct 2023 00:32:25 +0200 Subject: [PATCH] livesync: Move num_in counting to the src task This is in preparation for moving more accept/discard logic to the src task, so we can only count `num_in` here. Part-of: --- utils/livesync/src/livesync/imp.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/livesync/src/livesync/imp.rs b/utils/livesync/src/livesync/imp.rs index 169d6102..d198f0a6 100644 --- a/utils/livesync/src/livesync/imp.rs +++ b/utils/livesync/src/livesync/imp.rs @@ -964,7 +964,6 @@ impl LiveSync { state.queue.push_back(Item::Buffer(buffer, lateness)); state.buffer_queued = true; state.in_timestamp = timestamp; - state.num_in += 1; self.cond.notify_all(); Ok(gst::FlowSuccess::Ok) @@ -1132,6 +1131,8 @@ impl LiveSync { match in_buffer { Some((buffer, lateness)) => { + state.num_in += 1; + state.out_buffer = Some(buffer); state.out_timestamp = state.in_timestamp;