Skip to content

Fix filter-chain rendering, Part 2#1380

Merged
BitRate27 merged 3 commits into
DistroAV:masterfrom
Lordmau5:feat/fix-filter-chain-2
Nov 30, 2025
Merged

Fix filter-chain rendering, Part 2#1380
BitRate27 merged 3 commits into
DistroAV:masterfrom
Lordmau5:feat/fix-filter-chain-2

Conversation

@Lordmau5

Copy link
Copy Markdown
Contributor

This fixes up some issues that were missed with the first PR in #1343

  • Instead of checking for obs_source_active it now checks for obs_source_showing to ensure the filter is valid
    • This allows sending the video data when the source is showing in Studio mode for example)
  • Removed the NDI sender create logic inside the ndi_filter_tick method
    • This was leftover from before the changes to the "timeout" were made when it destroyed the NDI sender when the source became invalid (e.g. hidden, or invalid size)
  • Addition of a rendered boolean check
    • This ensures it will only render and send the source once, otherwise when it is visible multiple times (e.g. when the Properties window is opened) it will send frames out of order and it will look like it's stuttering (See video below)
Screen.Recording.2025-11-28.125332.mp4

Use `obs_source_showing` instead of `obs_source_active` to ensure the filter is valid (to allow rendering / sending in the OBS Preview for example)
This was leftover from when the NDI sender was destroyed when the source of the filter was hidden / invalid. The new logic keeps it active at all times, but doesn't send new data over when it doesn't call the render functions.
This extra check ensures we only render and send the video data once and not multiple times (e.g. when the source is active in an OBS window, such as the Preview, and then opening the Properties for the source, which will cause it to have frames sent out of order / causing it to seem like it stutters)
@BitRate27 BitRate27 self-assigned this Nov 30, 2025

@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.

Verified the filter works when the source is in the previewed scene.
Verified the NDI source will clear 3sec after empty frame received.
Verified the sender isn't trying to be recreated in the tick loop when the sender create fails.

@BitRate27
BitRate27 merged commit c1e6894 into DistroAV:master Nov 30, 2025
6 checks passed
@Lordmau5
Lordmau5 deleted the feat/fix-filter-chain-2 branch November 30, 2025 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants