Skip to content

libobs: Preserve transition state when swapping - #14086

Closed
prgmitchell wants to merge 1 commit into
obsproject:masterfrom
prgmitchell:newTransitionFix
Closed

prgmitchell wants to merge 1 commit into
obsproject:masterfrom
prgmitchell:newTransitionFix

Conversation

@prgmitchell

@prgmitchell prgmitchell commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Description

When an override interrupted an active transition, the scene sources were copied without the running state which could leave later scene changes stuck. Carry running transition state across swaps and prevent queued stop callbacks from restoring the default transition too early.

Motivation and Context

Fixes #11914

How Has This Been Tested?

Repro'd with the steps from the above issue, can no longer repro after this change.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have read the contributing document.
  • My code has been run through clang-format.
  • My code follows the project's style guidelines
  • My code is not on the master branch.
  • My code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@WizardCM WizardCM added the kind/bug Categorizes issue or PR as related to a bug. label Oct 25, 2026
@Warchamp7

Copy link
Copy Markdown
Member

Can you explain what exactly is going wrong here?

I'm able to reproduce this but the fix seems like it's papering over the problem.

@prgmitchell

prgmitchell commented Oct 25, 2026 •

Copy link
Copy Markdown
Member Author

@Warchamp7 there is always the chance I am lacking some understanding here so if you have another solution I am open to adjusting my PR. just essentially went through all the debug steps again real quick to make sure I got this explanation right.

I made two scenes: one with a green color source and one with red. once I was able to repro, I checked the transition state vs the selected scene and rendered output and the selected scene was Green but the output was Red. interrupting the fade transition with the cut override calls obs_transition_swap_begin() which copies the source slots/child activation state into the cut transition but doesn't copy transitioning_video and transitioning_audio flags. then in obs_transition_start() source A already matches the requested scene which is Red and the cut transition is inactive so it returns early without clearing Green from source B. then when you try to switch to Green again, set_source() sees that Green is already source B so it returns early and skips activate_transition but obs_transition_start() still emits the start signal which disables the transition controls. the transition doesn't ever become active, the output stays Red, and no completion signal arrives to enable controls again.

now all that being said, in doing this testing again I have realized their is a gap in my original fix that would still freeze when transitioning toward the already copied B so I have modified my approach a bit and updated the commit.

EDIT: need to look at this further, I misunderstood how some of this worked.

@prgmitchell
prgmitchell marked this pull request as draft October 26, 2026 00:16
Carry running transition state across swaps and prevent queued stop
callbacks from restoring the default transition too early.
@prgmitchell prgmitchell changed the title libobs: Fix scene freeze with transition overrides libobs: Preserve transition state when swapping Oct 26, 2026
@prgmitchell
prgmitchell requested a review from Warchamp7 October 26, 2026 01:30
@prgmitchell

Copy link
Copy Markdown
Member Author

Closing in favor of Warchamps changes

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

Labels

kind/bug Categorizes issue or PR as related to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Transition Override Prevents Transition (locks Program Scene)

3 participants