Repository navigation
Conversation
Warchamp7
commented
Oct 26, 2026
Warchamp7
left a comment
Member
Author
There was a problem hiding this comment.
A few additional contextual notes for reviewers.
Comment on lines
+249
to
+263
| static bool ValidTBarTransition(OBSSource transition) | ||
| { | ||
| if (!transition) { | ||
| return false; | ||
| } | ||
|
|
||
| QString id = QT_UTF8(obs_source_get_id(transition)); | ||
|
|
||
| if (id == "cut_transition" || id == "obs_stinger_transition") { | ||
| return false; | ||
| } | ||
|
|
||
| return true; | ||
| } | ||
|
|
Member
Author
There was a problem hiding this comment.
This function was moved up the file, not created.
Anonymous namespace functions are preferred but trying to keep the changes light.
|
|
||
| obs_transition_set_manual_torque(transition, 8.0f, 0.05f); | ||
| TransitionToScene(sceneSource, false, false, false, 0, true); | ||
| TransitionToScene(sceneSource, false, false, 0, false, true); |
Member
Author
There was a problem hiding this comment.
This is fixing a typo in the arguments here that didn't have any negative side effects thus far since 0 and false are equivalent.
int quickDuration is the fourth argument, not the fifth.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adjusts scene transition logic to interrupt an active transition whenever trying to swap it.
The additional squashme commits perform some additional cleanup and refactoring
GetCurrentTransitiontogetDefaultTransitionThis function returns the transition that is currently selected in the transitions dock dropdown menu. This transition is essentially the 'global default' or 'current selection'. The name "current transition" is potentially confusing, as OBS Studio always has a transition source set in channel 0 of the main canvas, thus there is always a 'current' one which may be different from the 'default'.
OverrideTransitiontoswapCurrentTransitionThe current logic for transition overrides tracks whether an override is being used via
overridingTransition. When the signal for a transition_stop comes in, it then tries to swap back to the 'default' transition ifoverridingTransition. This can lead to some weird races such as when interrupting a transition and immediately starting a different one, as this PR does.Much of the logic inside
OBSBasic::TransitionToScenealready does a bunch of checks for whether to use a quick transition or an override so it is updated to simply use the "default transition" in the absence of those.Another existing bug that stems from a race between libobs and the frontend. After using an override transition via the T Bar, the next attempt to use the T Bar to a scene with no override would fail, as the T Bar would update the transition time before it set the transition, and then fail the check for
stillTransitioninginTransitionToScene.Fixed by using
obs_transition_is_activeinstead which was added very recently, and by moving the transition selection logic intoTransitionToScenenext to the rest.This is a bug introduced by the above changes, where fading to black would get into a stuck state. Also adjusts the UX slightly so that the Program scene name doesn't change, and so that pressing the fade to black button after fading to black does nothing, instead of un-fading.
Motivation and Context
Scene transitions have a minor optimization via
obs_transition_swap_begin/obs_transition_swap_endthat avoids having to construct a new gs_texrender_t. However this swap skips a bunch of other transition state, leading to the bug in #11914 where interrupting a transition override could get the output stuck.Rather than simply copy other state stuff and risk this breaking again in the future, this PR instead prevents swapping active transitions, and adjusts the frontend code to explicitly skip the active transition before trying to swap. This ensures that the frontend only ever tries to swap a transition that is 'at rest'.
Alternative solution to #14086
Fixes #11914
How Has This Been Tested?
The original issue that spurred this investigation was with a scene override in non-studio mode.
Tested transitions between a number of scenes with and without scene overrides. Tested in studio mode and non studio mode. Tested with the default transition set to Cut, Fade, and a Stinger. Tested with scene overrides set to None, Cut, Fade.
Tested with the T Bar for the above permutations as well.
Types of changes
Checklist: