avfilter/af_arnndn: make sure that vad_output nb_neurons is always 1
authorPaul B Mahol <onemda@gmail.com>
Thu, 17 Oct 2019 09:02:02 +0000 (11:02 +0200)
committerPaul B Mahol <onemda@gmail.com>
Thu, 17 Oct 2019 09:02:02 +0000 (11:02 +0200)
libavfilter/af_arnndn.c

index 781d0dc..7688b31 100644 (file)
@@ -300,6 +300,11 @@ static RNNModel *rnnoise_model_from_file(FILE *f)
     INPUT_DENSE(denoise_output);
     INPUT_DENSE(vad_output);
 
+    if (vad_output->nb_neurons != 1) {
+        rnnoise_model_free(ret);
+        return NULL;
+    }
+
     return ret;
 }