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

Improved encoder unpairing #560

Merged
merged 1 commit into from
Jan 2, 2024
Merged

Improved encoder unpairing #560

merged 1 commit into from
Jan 2, 2024

Conversation

avoitenko-logitech
Copy link

Description

Unpair encoders (updated version)

Motivation and Context

This is a fix for crash with the following stack:

pthread_mutex_lock (pthread_mutex_lock.c:73)
blogva (base.c:111)
blog (base.c:119)
obs_encoder_shutdown (obs-encoder.c:553)
obs_encoder_initialize_internal (obs-encoder.c:487)
obs_encoder_initialize (obs-encoder.c:539)
initialize_audio_encoders (obs-output.c:2089)
obs_output_initialize_encoders (obs-output.c:2161)
os_gettime_ns (platform-windows.c:489)
obs_output_delay_start (obs-output-delay.c:147)
fdexp
std::_Char_traits<T>::move (xstring:119)
std::basic_string<T>::assign (xstring:3380)
obs_output_start (obs-output.c:311)
OBS_service::startStreaming (nodeobs_service.cpp:1132)

It started to happen because of incorrect attempt to fix crash in GPU encode thread.
Now I've found more proper place ho unpair encoders which is still needed to avoid operations with potentially dangling pointer.

How Has This Been Tested?

Manually, windows only.

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 e140bea into streamlabs Jan 2, 2024
13 of 15 checks passed
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