1 parent ad522f9 commit 283b2e4Copy full SHA for 283b2e4
1 file changed
src/ndi-source.cpp
@@ -642,6 +642,17 @@ void *ndi_source_thread(void *data)
642
ndiLib->recv_set_tally(ndi_receiver, &tally);
643
}
644
645
+ //
646
+ // If this source isn't showing in OBS then don't receive any frames from NDI. This occurs when multiple
647
+ // scenes have NDI sources that are not being shown and behavior is set to Keep Active. Without this check,
648
+ // the fps of OBS can decrease dramatically, especially with multiple 4K 60 sources.
649
650
+ if (!obs_source_showing(s->obs_source)) {
651
+ // Avoid busy-waiting when the source is hidden but kept active.
652
+ std::this_thread::sleep_for(std::chrono::milliseconds(5));
653
+ continue;
654
+ }
655
+
656
if (ndi_frame_sync) {
657
//
658
// ndi_frame_sync
0 commit comments