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

Unpair encoders on destruction + logs #548

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

avoitenko-logitech
Copy link

Description

Attempt to fix crash in GPU encode thread. It seems like there are several execution paths that lead to this crash. This change makes attempt to fix one of them.

Motivation and Context

I noticed that during GPU encode data from paired (audio) encoder is used to check timings.
There is a function pair_encoders which sets paired_encoder for both sides (audio and video). But during call to obs_encoder_shutdown value is reset only from the one side => we have classic dangling pointer problem.

Also I added more logs for encoders lifecycle functions to help troubleshoot this nasty crash further.

How Has This Been Tested?

Manually in UI.

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 streamlabs 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.

@summeroff summeroff merged commit 8deb98d into streamlabs Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants