Skip to content

Remove/destroy the NDI filter sender when source is removed#1457

Merged
Trouffman merged 3 commits into
masterfrom
fix-filter-destroy
Apr 24, 2026
Merged

Remove/destroy the NDI filter sender when source is removed#1457
Trouffman merged 3 commits into
masterfrom
fix-filter-destroy

Conversation

@Trouffman

Copy link
Copy Markdown
Collaborator

Uniformise the destroy process for video & audio filter

Call the filter_remove when a filter is actually removed (or parent is deleted)

Resolving this will address and close #1407

@Trouffman
Trouffman requested a review from BitRate27 April 23, 2026 21:37
@Trouffman Trouffman self-assigned this Apr 23, 2026
@Trouffman Trouffman added bug filter-feature For anything that is tied to an NDI Filter. labels Apr 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses issue #1407 by ensuring the NDI sender associated with the “Dedicated NDI Output” filter is torn down when the filter is removed (including when its parent source is deleted), not only when OBS shuts down.

Changes:

  • Added a filter_remove callback to destroy the NDI sender when the filter is removed from its parent.
  • Refactored rename signal handler disconnection into a shared helper to reuse across destroy/remove paths.
  • Unified sender teardown by routing destruction through ndi_sender_destroy().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ndi-filter.cpp
@BitRate27

BitRate27 commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

This use case fails to destroy the filter:

  1. Create a new NDI source
  2. Add a Dedicated Output filter
  3. Close the filter dialog
  4. Verify the sender is created in Studio Monitor
  5. Open the filters dialog
  6. With the filters dialog open, delete the NDI source
  7. Dedicated Output filter still available for selection in Studio Monitor << Bug?
  8. Closing filters dialog will force the removal of the filter!

I believe this is a because of the OBS API not calling filter_remove while there is a filter dialog open.

@BitRate27 BitRate27 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good!

@Trouffman
Trouffman merged commit 040b927 into master Apr 24, 2026
9 checks passed
@Trouffman
Trouffman deleted the fix-filter-destroy branch April 24, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug filter-feature For anything that is tied to an NDI Filter.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Dedicated NDI Output not destroyed when source deleted

3 participants