diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2020-02-05 16:03:06 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2020-02-08 10:15:27 +0000 |
commit | 395e074c7322a7de21b8b2cf82013ec5454b353e (patch) | |
tree | 2801ace90dd486cbe90a8d7947de5835b1a55a64 | |
parent | 871d3e5f4498016b0bbf976be3b5361e703499fa (diff) | |
download | gstreamer-plugins-bad-395e074c7322a7de21b8b2cf82013ec5454b353e.tar.gz |
ladspa: fix unbounded integer properties
Use a double instead of a plain float for intermediary
property values, so we have enough bits to store INT_MAX
and it doesn't get rounded and wrapped to -1 when cast
back to a 32-bit integer.
Fixes criticals like
g_param_spec_int: assertion 'default_value >= minimum && default_value <= maximum' failed
when loading LADSPA plugins from the Linux Studio Plugins
Project (http://lsp-plug.in) in GStreamer.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1194
-rw-r--r-- | ext/ladspa/gstladspautils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/ladspa/gstladspautils.c b/ext/ladspa/gstladspautils.c index d55db6f85..f1de0007f 100644 --- a/ext/ladspa/gstladspautils.c +++ b/ext/ladspa/gstladspautils.c @@ -346,7 +346,7 @@ gst_ladspa_object_class_get_param_spec (GstLADSPAClass * ladspa_class, GParamSpec *ret; gchar *name; gint hintdesc, perms; - gfloat lower, upper, def; + gdouble lower, upper, def; name = gst_ladspa_object_class_get_param_name (ladspa_class, object_class, |