Просмотр исходного кода

win-capture: Disable audio source when game capture unhooks

derrod 2 лет назад
Родитель
Сommit
d87cf9c7eb
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      plugins/win-capture/game-capture.c

+ 4 - 0
plugins/win-capture/game-capture.c

@@ -380,6 +380,10 @@ static void stop_capture(struct game_capture *gc)
 		calldata_set_ptr(&data, "source", gc->source);
 		calldata_set_ptr(&data, "source", gc->source);
 		signal_handler_signal(sh, "unhooked", &data);
 		signal_handler_signal(sh, "unhooked", &data);
 		calldata_free(&data);
 		calldata_free(&data);
+
+		// Also update audio source to stop capturing
+		if (gc->audio_source)
+			reconfigure_audio_source(gc->audio_source, NULL);
 	}
 	}
 
 
 	gc->copy_texture = NULL;
 	gc->copy_texture = NULL;