From dbb0e71e70c17198f00e680b00195a20d4d53bd1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 5 Feb 2020 16:12:28 +0000 Subject: [PATCH] ladspa: only multiply bounded rate properties by sample rate We don't want to accidentally multiply G_MAXFLOAT or -GMAXFLOAT with the sample rate. --- ext/ladspa/gstladspautils.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/ladspa/gstladspautils.c b/ext/ladspa/gstladspautils.c index f1de000..53ddbb1 100644 --- a/ext/ladspa/gstladspautils.c +++ b/ext/ladspa/gstladspautils.c @@ -380,8 +380,10 @@ gst_ladspa_object_class_get_param_spec (GstLADSPAClass * ladspa_class, if (LADSPA_IS_HINT_SAMPLE_RATE (hintdesc)) { /* FIXME:! (*= ladspa->rate?, *= GST_AUDIO_DEF_RATE?) */ - lower *= 44100; - upper *= 44100; + if (LADSPA_IS_HINT_BOUNDED_BELOW (hintdesc)) + lower *= 44100; + if (LADSPA_IS_HINT_BOUNDED_ABOVE (hintdesc)) + upper *= 44100; } if (LADSPA_IS_HINT_INTEGER (hintdesc)) { -- 2.7.4