Skip to content

obs-media-io: restore scaler buffers to their original registration - #1544

Merged
zackees merged 2 commits into
masterfrom
fix/1540-scaler-buffer-identity
Oct 20, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/1540-scaler-buffer-identity

Conversation

@zackees

@zackees zackees commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Disconnecting and reconnecting an input during scaling can reuse its callback and parameter. Restoring the old scaler buffer by those fields inserts it into the replacement and panics the video thread. Keep the registration identity through scaling and restore buffers only to that original registration.

Fixes #1540. Split from #1462. This PR contains only the buffer-ownership issue; the callback-delivery fix (#1539) is already on master.

Validation:

  • RED ecb36cc80b27b5ae743df898ef75da450ba2ec3d: soldr cargo test -p obs-media-io replaced_input_does_not_receive_old_scaler_buffers -- --test-threads=1 reproduces the insertion-index panic.
  • GREEN: all 237 media tests and both doctests pass.
  • The replacement regression passes 100 consecutive runs. It checks delivery to the other subscriber, delivery to the replacement on the next frame, and that the replacement receives no old scaler buffers.
  • No public headers or existing C tests changed. PR CI supplies unchanged C compatibility validation. Tier 4 does not apply to this internal video API.

@zackees
zackees force-pushed the fix/1535-video-self-disconnect branch from 292429a to fa32d39 Compare October 20, 2026 17:56
@zackees
zackees force-pushed the fix/1540-scaler-buffer-identity branch from a22bc3a to cc78235 Compare October 20, 2026 17:58
@zackees
zackees changed the base branch from fix/1535-video-self-disconnect to master October 20, 2026 18:26
@zackees
zackees force-pushed the fix/1540-scaler-buffer-identity branch from cc78235 to 8c0d6eb Compare October 20, 2026 18:26
@zackees
zackees marked this pull request as ready for review October 20, 2026 18:38
@zackees
zackees added this pull request to the merge queue Oct 20, 2026
Merged via the queue into master with commit 1faf087 Oct 20, 2026
23 checks passed
@zackees
zackees deleted the fix/1540-scaler-buffer-identity branch October 26, 2026 15:43
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.

bug: obs-media-io: restore scaler buffers to their original registration

1 participant