From: Steinar H. Gunderson Date: Mon, 1 Jun 2020 16:17:34 +0000 (+0200) Subject: Fix a missing lock around handle_hotplugged_cards(). X-Git-Tag: 2.0.0~12 X-Git-Url: https://git.sesse.net/?p=nageru;a=commitdiff_plain;h=0950567791d86f41e54f9c5d178a39146e3c0c08 Fix a missing lock around handle_hotplugged_cards(). --- diff --git a/nageru/mixer.cpp b/nageru/mixer.cpp index 3b7a99c..5f5bc13 100644 --- a/nageru/mixer.cpp +++ b/nageru/mixer.cpp @@ -1289,7 +1289,10 @@ void Mixer::thread_func() assert(master_card_index < MAX_VIDEO_CARDS); } - handle_hotplugged_cards(); + { + lock_guard lock(card_mutex); + handle_hotplugged_cards(); + } vector raw_audio[MAX_VIDEO_CARDS]; // For MJPEG encoding. OutputFrameInfo output_frame_info = get_one_frame_from_each_card(master_card_index, master_card_is_output, new_frames, has_new_frame, raw_audio);