Skip to content

libobs: don't follow a NULL filter target when asking a filter's size (#2172) - #2200

Merged
zackees merged 2 commits into
masterfrom
fix/filter-size-null-target
Oct 24, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/filter-size-null-target

Conversation

@zackees

@zackees zackees commented Oct 24, 2026

Copy link
Copy Markdown
Member

Fixes #2172.

  • RED (test_filter_size_no_target): the second filter's create callback, run inside obs_source_restore_filters(), asks the first filter's size while it has a parent and no target. Local Tier 2 on the RED commit: Segmentation fault(11).
  • GREEN: OBS_SOURCE_SIZE_ASK_TARGET returns 0 when filter_target is NULL (width and height); obs_source_restore_filters() links every target, then sets the parents. Attached filters still report the source's size (asserted).
  • Ledger line under Fixed upstream bugs → Stability.

RED: obs_source_restore_filters() leaves the first filter with a parent
and no target while it loads the second; asking its size then follows a
NULL filter_target.
…s first (#2172)

get_base_width()/get_base_height() followed filter_target without a NULL
check, and obs_source_restore_filters() gave each filter its parent before
its target. Set every target before any parent, and report 0 for a filter
that has no target yet.
@zackees
zackees enabled auto-merge October 24, 2026 18:46
@zackees
zackees added this pull request to the merge queue Oct 24, 2026
Merged via the queue into master with commit 3ca552d Oct 24, 2026
35 checks passed
@zackees
zackees deleted the fix/filter-size-null-target branch October 26, 2026 15:44
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.

libobs: A filter's size query can follow a NULL target during filter restore or removal

1 participant