Skip to content

fix(obs-filters): keep async video delay stable across skipped ticks - #3515

Merged
zackees merged 2 commits into
masterfrom
fix/3368-async-delay-audio
Nov 2, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/3368-async-delay-audio

Conversation

@zackees

@zackees zackees commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

When graphics ticks skip input frames, Video Delay (Async) continues replaying exactly one queued frame per tick. It can return an expired picture and increase its delay, or consume a picture before its configured delay has elapsed when earlier input timestamps contain a gap.

This change selects the newest eligible queued picture, releases older eligible pictures, and retains a picture until its delay has elapsed. Zero delay, rewinds, and forward timestamp jumps preserve their existing behavior.

Refs #3368. This is a scoped partial fix discovered during that investigation. The original loaded audio dropout still reproduces with this change, so the issue stays open and its sanitizer exemption stays in place. No C/Rust audio timing helpers or public headers change. Native coverage uses the routine gate: shared plugin logic, no platform implementation changes.

Validation:

  • RED a8e17f676: both deterministic queue cases fail with the old filter (frame 200 ms rather than 400 ms after skipped ticks; a frame returned before its delay elapses across a historical gap).
  • GREEN d197cb1a7: all four deterministic queue cases pass under ASAN/UBSAN with leak detection, including zero delay and backward/forward timestamp resets.
  • Official sanitizer run_one_test passes the unchanged six-case audio integration test (exit 0) and the queue regression (exit 0). Tones have zero breaks at 1/3/5-second configured delay; measured click delays are 1077 ms / 3087 ms / 0 ms for 1-second / 3-second / no filter.
  • Full repository clang-format (4099 files), gersemi (772 files), build-group tests (10 cases), Python invocation policy tests (5 cases), and git diff --check pass. A read-only clud-review found no blocking issues; its zero-delay/reset guard suggestion is included.
  • Local diagnostic C rollback build uses GCC with CMAKE_COMPILE_WARNING_AS_ERROR=OFF because existing legacy conversion warnings fail that configuration; no repository compiler flags change. Hosted PR CI remains the required gate; Linux Tier 2 covers both hybrid and explicit C reference. The original reproduction also deliberately used the slow unwinder; final official harness uses its current per-test unwinder policy.
  • The original four-CPU, three-competing-process, cold-Mesa/slow-ASAN-unwinder reproduction remains unresolved: one fixed-filter run still reports two tone breaks. A later traced run passes, confirming this is not proof of resolution.

The features ledger records the queue behavior only. Tier 3 C/Rust parity is unchanged because this PR modifies the preserved C plugin rather than a Rust port.

@zackees
zackees marked this pull request as ready for review November 2, 2026 23:12
@zackees
zackees added this pull request to the merge queue Nov 2, 2026
Merged via the queue into master with commit b60ff5e Nov 2, 2026
41 checks passed
@zackees
zackees deleted the fix/3368-async-delay-audio branch November 2, 2026 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant