Skip to content

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

Closed

Description

@zackees

Location

rust/obs-media-io/src/video_output.rs, original commit b35f6445b in #1462.

Class

Reentrant callback identity confusion / panic.

How it is reached

Disconnecting and reconnecting an input during scaling reuses its callback and parameter. The old scaler buffer is inserted into the replacement input, panicking the video thread.

Proposed fix and failing test

Keep the registration identity across scaling and restore buffers only to that identity. Reproduce replaced_input_does_not_receive_old_scaler_buffers before the fix, then run the media tests.

Decisions

Split from #1462 at the maintainer's request. Builds on #1539's registration identity. Rust intentionally handles replacement during scaling rather than restoring buffers to a different registration. C differential cases retain their existing nonreentrant baseline.

Activity

  1. zackees commented on Oct 20, 2026

    @zackees
    MemberAuthor

    Claiming: split the last fix from #1462. 1. Reproduce buffer replacement panic. 2. Verify the focused fix. 3. Open its standalone PR once #1539 lands, then merge through CI.

  2. added
    claimed
    on Oct 20, 2026
  3. zackees commented on Oct 20, 2026

    @zackees
    MemberAuthor

    Fixed and merged in #1544. Scaler buffers are restored only to their original registration, so an input replaced during scaling cannot inherit them or panic the video thread. The regression checks the other subscriber and next-frame delivery to the replacement; it passed 100 consecutive runs. All 237 media tests, both doctests, required PR CI, and merge-group CI passed. No remaining work for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    claimed

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions