From 343bebd6ff688d7b49a84f75058c863a38686893 Mon Sep 17 00:00:00 2001 From: Roy Shilkrot Date: Tue, 22 Aug 2023 09:53:04 +0300 Subject: [PATCH] mutex reset --- src/transcription-filter.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/transcription-filter.cpp b/src/transcription-filter.cpp index c5b5c83..bb015f8 100644 --- a/src/transcription-filter.cpp +++ b/src/transcription-filter.cpp @@ -330,11 +330,10 @@ void *transcription_filter_create(obs_data_t *settings, obs_source_t *filter) gf->resampler = audio_resampler_create(&dst, &src); obs_log(LOG_INFO, "transcription_filter: setup mutexes and condition variables"); - gf->whisper_buf_mutex = std::unique_ptr(new std::mutex()); - gf->whisper_ctx_mutex = std::unique_ptr(new std::mutex()); - gf->wshiper_thread_cv = - std::unique_ptr(new std::condition_variable()); - gf->text_source_mutex = std::unique_ptr(new std::mutex()); + gf->whisper_buf_mutex.reset(new std::mutex()); + gf->whisper_ctx_mutex.reset(new std::mutex()); + gf->wshiper_thread_cv.reset(new std::condition_variable()); + gf->text_source_mutex.reset(new std::mutex()); gf->text_source = nullptr; gf->text_source_name = nullptr;