提交 739c5818 编写于 作者: F fryshorts

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.
上级 1d2e5d50
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册