Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libobs: Fix crash when mix is NULL #10674

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

exeldro
Copy link
Contributor

@exeldro exeldro commented May 14, 2024

Description

When obs_reset_video is called, it calls obs_free_video that sets the mix to NULL here: https://github.com/obsproject/obs-studio/blob/master/libobs/obs.c#L879

Motivation and Context

Don't like crashes when switching resolution

How Has This Been Tested?

On windows by changing the resolution multiple times

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.

@tt2468
Copy link
Member

tt2468 commented May 14, 2024

Just curious, in what situation did you encounter this?

@exeldro
Copy link
Contributor Author

exeldro commented May 14, 2024

I encountered this investigating a bug report with Aitum Vertical causing a crash after switching resolution of the main canvas

@WizardCM WizardCM added the Bug Fix Non-breaking change which fixes an issue label May 14, 2024
@notr1ch
Copy link
Member

notr1ch commented May 14, 2024

In obs_free_video , wouldn't including the da_free(obs->video.mixes); in the mutex be a better solution?

@Lain-B Lain-B self-assigned this May 25, 2024
@exeldro
Copy link
Contributor Author

exeldro commented May 26, 2024

That should work too, I have no preference

@notr1ch
Copy link
Member

notr1ch commented May 26, 2024

I think I'd prefer that as it protects against other possible race conditions.

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.

None yet

5 participants