Skip to content

Conversation

@exeldro
Copy link
Contributor

@exeldro exeldro commented Dec 26, 2025

Description

Restore only canvases that have video info

Motivation and Context

When you have an extra canvas from a plugin that is disabled or removed and you change the resolution of the main canvas it will stop the graphics thread completely. The log lines look like this:

17:26:03.069: Invalid video parameters specified
17:26:03.069: Failed restoring video mix for canvas 'Aitum Vertical'

obs_canvas_reset_video_internal will fail because internal video info is not set
restore_canvases will return false
obs_init_video will not start the graphics thread

How Has This Been Tested?

On windows 11 by installing Aitum Vertical and disabling it after it created a canvas. Changing the size of the main resolution stops the graphics thread.

Types of changes

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

Checklist:

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

Copy link
Member

@PatTheMav PatTheMav left a comment

Choose a reason for hiding this comment

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

While correct, I do wonder if this isn't a check that should be made in obs_canvas_reset_video_internal.

Should it be the responsibility of the calling code to figure out whether an internal implementation detail of a canvas has a valid value before calling another canvas-specific API function?

My initial reaction is that the calling code should not, because that requires the calling code to know about these details of a canvas, however the use of opaque types like obs_canvas_t imply that one should not know (or be aware) of anything inside that black box.

@exeldro exeldro force-pushed the fix_restore_canvases branch from 598d780 to 305e576 Compare January 16, 2026 06:58
@exeldro
Copy link
Contributor Author

exeldro commented Jan 16, 2026

Moved the check to obs_canvas_reset_video_internal as suggested by @PatTheMav

@exeldro exeldro requested a review from PatTheMav January 16, 2026 07:04
@RytoEX RytoEX self-assigned this Jan 16, 2026
@RytoEX RytoEX added this to the OBS Studio 32.1 milestone Jan 16, 2026
@RytoEX RytoEX added the Bug Fix Non-breaking change which fixes an issue label Jan 16, 2026
@RytoEX RytoEX merged commit 9a62529 into obsproject:master Jan 16, 2026
15 checks passed
@exeldro exeldro deleted the fix_restore_canvases branch January 16, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Fix Non-breaking change which fixes an issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants