]> git.sesse.net Git - nageru/blobdiff - nageru/mixer.cpp
Add a UI toggle to turn off SRT at runtime.
[nageru] / nageru / mixer.cpp
index 0efed5aa2d89137eb1bcc7a3baa2be7895984f04..3b7a99c0319ea567a0f5fcb38f17075ef9d7151d 100644 (file)
@@ -2159,6 +2159,12 @@ void Mixer::start_srt()
                                }
                                break;
                        }
+                       if (!global_flags.enable_srt) {  // Runtime UI toggle.
+                               // Perhaps not as good as never listening in the first place,
+                               // but much simpler to turn on and off.
+                               srt_close(clientsock);
+                               continue;
+                       }
                        lock_guard<mutex> lock(hotplug_mutex);
                        hotplugged_srt_cards.push_back(clientsock);
                }