gstavcfg.c: fix max->min typo in limits and implict double conversion

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/86>
This commit is contained in:
Jordan Petridis 2020-08-03 19:28:29 +03:00
parent edce08b526
commit 8d3c0a1f8a
2 changed files with 43 additions and 38 deletions

View file

@ -28382,7 +28382,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -28784,7 +28784,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -29408,7 +29408,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -29994,7 +29994,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -30358,7 +30358,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -30722,7 +30722,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -31086,7 +31086,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -31450,7 +31450,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -31814,7 +31814,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -32178,7 +32178,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -36292,7 +36292,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -36656,7 +36656,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -45040,7 +45040,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -45404,7 +45404,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -49258,7 +49258,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -56966,7 +56966,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -57330,7 +57330,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -57694,7 +57694,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -58072,7 +58072,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -72434,7 +72434,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -72798,7 +72798,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -73162,7 +73162,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -82038,7 +82038,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -82402,7 +82402,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -85048,7 +85048,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -96882,7 +96882,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -97246,7 +97246,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -101640,7 +101640,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -102004,7 +102004,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -104740,7 +104740,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -105104,7 +105104,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -110070,7 +110070,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -110434,7 +110434,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -113146,7 +113146,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -113534,7 +113534,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,
@ -113898,7 +113898,7 @@
"construct-only": false,
"controllable": false,
"default": "0",
"max": "9223372036854775807",
"max": "18446744073709550000",
"min": "0",
"mutable": "null",
"readable": true,

View file

@ -339,8 +339,13 @@ install_opts (GObjectClass * gobject_class, const AVClass ** obj, guint prop_id,
case AV_OPT_TYPE_UINT64:
/* ffmpeg expresses all ranges with doubles, this is appalling */
pspec = g_param_spec_uint64 (name, name, help,
(gint64) (min == (gdouble) 0 ? 0 : min),
(gint64) (max == (gdouble) UINT64_MAX ? UINT64_MAX : min),
(guint64) (min <= (gdouble) 0 ? 0 : (guint64) min),
(guint64) (max >=
/* Biggest value before UINT64_MAX that can be represented as double */
(gdouble) 18446744073709550000.0 ?
/* The Double conversion rounds UINT64_MAX to a bigger */
/* value, so the following smaller limit must be used. */
G_GUINT64_CONSTANT (18446744073709550000) : (guint64) max),
opt->default_val.i64, G_PARAM_READWRITE);
g_object_class_install_property (gobject_class, prop_id++, pspec);
break;