diff --git a/src/screencasting/pw_utils.rs b/src/screencasting/pw_utils.rs index ba10be3e..cd6908dd 100644 --- a/src/screencasting/pw_utils.rs +++ b/src/screencasting/pw_utils.rs @@ -1434,6 +1434,13 @@ unsafe fn mark_buffer_as_good(pw_buffer: NonNull, sequence: &mut u64) // Clear the corrupted flag we may have set before. (*header).flags = 0; (*header).seq = *sequence; + + // Set buffer timestamp as unknown. + // + // FIXME: we could try passing real presentation timestamps for rendered frames here. + // However, then we must also ensure that the time base never jumps (e.g. when switching a + // dynamic cast between outputs) as this would mess up the timing downstream. + (*header).pts = -1; } }