mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
gstlv2utils.c: avoid implicit float to int conversion
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1487>
This commit is contained in:
parent
26bbcae973
commit
92f9567737
1 changed files with 4 additions and 2 deletions
|
@ -543,9 +543,11 @@ gst_lv2_object_get_property (GstLV2 * lv2, GObject * object,
|
|||
case G_TYPE_BOOLEAN:
|
||||
g_value_set_boolean (value, controls[prop_id] > 0.0f);
|
||||
break;
|
||||
case G_TYPE_INT:
|
||||
g_value_set_int (value, CLAMP (controls[prop_id], G_MININT, G_MAXINT));
|
||||
case G_TYPE_INT:{
|
||||
gint64 ival = CLAMP ((gint64) controls[prop_id], G_MININT, G_MAXINT);
|
||||
g_value_set_int (value, ival);
|
||||
break;
|
||||
}
|
||||
case G_TYPE_FLOAT:
|
||||
g_value_set_float (value, controls[prop_id]);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue