X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fmixer.cpp;h=5f5bc133f8470f6f893661549c566451bd484bd3;hb=0950567791d86f41e54f9c5d178a39146e3c0c08;hp=3b7a99c0319ea567a0f5fcb38f17075ef9d7151d;hpb=866a3f4f11beecbeeda8a2bba3700cd5172695b1;p=nageru 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);