You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: libobs: push-to-talk delays can wrap and the audio balance isn't range-checked #2051
Two per-source audio values aren't range-checked, so a scene collection (or a plugin or script calling the API) can set values that break them.
Push-to-mute / push-to-talk delay. The delays are kept in milliseconds as uint64_t. Scene collections store them as signed integers, so a negative value turns into a huge delay. source_output_audio_data then computes os_time + delay * 1000000, which wraps for large delays. The stop time can then land in the past or far in the future: push-to-talk stays open forever, or closes at once.
Audio balance.obs_source_set_balance_value() and the scene-collection load accept any float. The balance laws assume 0–1. Outside that range the gains go negative, above 1, or NaN (for example, the sine law at a balance of 2 inverts a channel). obs-websocket's SetInputAudioBalance already checks 0–1, and the UI slider can't leave that range.
Found while scoping the audio ports (#1994/#2021). Upstream has the same code.
Plan
RED: tests through the public API and a loaded scene collection.
A negative delay and a delay of UINT64_MAX / 1000000 + 1; the stop time must stay ordered.
Balances of -1, 2, NaN and ±inf, through the setter and through load.
GREEN:
Saturate the delay-to-nanoseconds conversion and the stop-time sum.
Read a negative delay from a scene collection as 0.
Clamp the balance to 0–1 in the setter. NaN becomes the default of 0.5.
Activity
rdoupe commentedon Oct 24, 2026
Claiming: #2051.
test: Expect push-to-talk delays and the audio balance to stay in range
libobs: Saturate push-to-talk stop times and clamp the audio balance
libobs: Saturate push-to-talk stop times and clamp the audio balance
libobs: Saturate push-to-talk stop times and clamp the audio balance (o…
libobs: Move the source monitoring decisions
obs-source: Port the source monitoring rules (obs-rust#2629)