summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2020-02-05 16:12:28 +0000
committerTim-Philipp Müller <tim@centricular.com>2020-02-08 10:15:27 +0000
commit39aea471a3333f1bbfc227085483bba43d082315 (patch)
treefdfe9f71c2a33dc2506786ede35226e0a241b9af
parent395e074c7322a7de21b8b2cf82013ec5454b353e (diff)
downloadgstreamer-plugins-bad-39aea471a3333f1bbfc227085483bba43d082315.tar.gz
ladspa: only multiply bounded rate properties by sample rate
We don't want to accidentally multiply G_MAXFLOAT or -GMAXFLOAT with the sample rate.
-rw-r--r--ext/ladspa/gstladspautils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/ladspa/gstladspautils.c b/ext/ladspa/gstladspautils.c
index f1de0007f..53ddbb117 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)) {