summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Petridis <jordan@centricular.com>2020-08-03 19:28:29 +0300
committerJordan Petridis <jordan@centricular.com>2020-08-04 18:56:45 +0300
commit8d3c0a1f8a8fa6411c3a4f50a06cd077118e7883 (patch)
tree250e80c26b18485f691c4b4ce2862d7ea2372916
parentedce08b526d9288ea75b0b3e0597030c8714d4cf (diff)
downloadgst-libav-8d3c0a1f8a8fa6411c3a4f50a06cd077118e7883.tar.gz
gstavcfg.c: fix max->min typo in limits and implict double conversion
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/86>
-rw-r--r--docs/gst_plugins_cache.json72
-rw-r--r--ext/libav/gstavcfg.c9
2 files changed, 43 insertions, 38 deletions
diff --git a/docs/gst_plugins_cache.json b/docs/gst_plugins_cache.json
index 08b33cb..afac352 100644
--- a/docs/gst_plugins_cache.json
+++ b/docs/gst_plugins_cache.json
@@ -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,
diff --git a/ext/libav/gstavcfg.c b/ext/libav/gstavcfg.c
index 7f289d7..c736920 100644
--- a/ext/libav/gstavcfg.c
+++ b/ext/libav/gstavcfg.c
@@ -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;