Remove output from encoder when output is destroyed.
This fixes an issue reported by valgrind where a destroyed output is still referenced by the encoder.
This commit is contained in:
parent
1d2e5d50a4
commit
739c58187c
@ -118,6 +118,15 @@ void obs_output_destroy(obs_output_t output)
|
||||
if (output->context.data)
|
||||
output->info.destroy(output->context.data);
|
||||
|
||||
if (output->video_encoder) {
|
||||
obs_encoder_remove_output(output->video_encoder,
|
||||
output);
|
||||
}
|
||||
if (output->audio_encoder) {
|
||||
obs_encoder_remove_output(output->audio_encoder,
|
||||
output);
|
||||
}
|
||||
|
||||
pthread_mutex_destroy(&output->interleaved_mutex);
|
||||
obs_context_data_free(&output->context);
|
||||
bfree(output);
|
||||
|
Loading…
x
Reference in New Issue
Block a user