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

obs-filters: disable NVIDIA FX audio model loading when SDK is not installed

This fixes a bug reported by R1ch internally.
If someone uses NVIDIA noise suppression filter and later uninstalls
the SDK, there can be a crash because the filter tries to load the
models.

Signed-off-by: pkv <[email protected]>
pkv 2 лет назад
Родитель
Сommit
ace518804b
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      plugins/obs-filters/noise-suppress-filter.c

+ 1 - 1
plugins/obs-filters/noise-suppress-filter.c

@@ -466,7 +466,7 @@ static void noise_suppress_update(void *data, obs_data_t *s)
 		strcmp(method, S_METHOD_NVAFX_DEREVERB) == 0 ||
 		strcmp(method, S_METHOD_NVAFX_DEREVERB_DENOISER) == 0;
 #ifdef LIBNVAFX_ENABLED
-	if (nvafx_requested)
+	if (nvafx_requested && ng->nvafx_enabled)
 		set_model(ng, method);
 	float intensity = (float)obs_data_get_double(s, S_NVAFX_INTENSITY);
 	if (ng->use_nvafx && ng->nvafx_initialized) {