libobs: Restore only canvases that have video info#12960
Merged
RytoEX merged 1 commit intoobsproject:masterfrom Jan 16, 2026
Merged
libobs: Restore only canvases that have video info#12960RytoEX merged 1 commit intoobsproject:masterfrom
RytoEX merged 1 commit intoobsproject:masterfrom
Conversation
PatTheMav
reviewed
Jan 14, 2026
Member
PatTheMav
left a comment
There was a problem hiding this comment.
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.
598d780 to
305e576
Compare
Contributor
Author
|
Moved the check to |
derrod
approved these changes
Jan 16, 2026
PatTheMav
approved these changes
Jan 16, 2026
RytoEX
approved these changes
Jan 16, 2026
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
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:
obs_canvas_reset_video_internalwill fail because internal video info is not setrestore_canvaseswill returnfalseobs_init_videowill not start the graphics threadHow 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
Checklist: