gtk: Fix "pixel-aspect-ratio" property range
authorBastien Nocera <hadess@hadess.net>
Tue, 11 May 2021 09:28:57 +0000 (11:28 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 12 Jan 2022 13:27:31 +0000 (13:27 +0000)
Fix the arguments passed to gst_param_spec_fraction in the incorrect
order.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1137>

subprojects/gst-plugins-good/docs/gst_plugins_cache.json
subprojects/gst-plugins-good/ext/gtk/gstgtkbasesink.c
subprojects/gst-plugins-good/ext/gtk/gtkgstbasewidget.c

index d558a53..324d0f3 100644 (file)
                         "controllable": false,
                         "default": "0/1",
                         "max": "2147483647/1",
-                        "min": "0/1",
+                        "min": "0/2147483647",
                         "mutable": "null",
                         "readable": true,
                         "type": "GstFraction",
index bc9a6a4..ff98dae 100644 (file)
@@ -113,9 +113,9 @@ gst_gtk_base_sink_class_init (GstGtkBaseSinkClass * klass)
 
   g_object_class_install_property (gobject_class, PROP_PIXEL_ASPECT_RATIO,
       gst_param_spec_fraction ("pixel-aspect-ratio", "Pixel Aspect Ratio",
-          "The pixel aspect ratio of the device", DEFAULT_DISPLAY_PAR_N,
-          DEFAULT_DISPLAY_PAR_D, G_MAXINT, 1, 1, 1,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          "The pixel aspect ratio of the device",
+          0, G_MAXINT, G_MAXINT, 1, DEFAULT_DISPLAY_PAR_N,
+          DEFAULT_DISPLAY_PAR_D, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_property (gobject_class, PROP_IGNORE_ALPHA,
       g_param_spec_boolean ("ignore-alpha", "Ignore Alpha",
index de85c3f..0fbe131 100644 (file)
@@ -454,9 +454,9 @@ gtk_gst_base_widget_class_init (GtkGstBaseWidgetClass * klass)
 
   g_object_class_install_property (gobject_klass, PROP_PIXEL_ASPECT_RATIO,
       gst_param_spec_fraction ("pixel-aspect-ratio", "Pixel Aspect Ratio",
-          "The pixel aspect ratio of the device", DEFAULT_DISPLAY_PAR_N,
-          DEFAULT_DISPLAY_PAR_D, G_MAXINT, 1, 1, 1,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          "The pixel aspect ratio of the device",
+          0, 1, G_MAXINT, G_MAXINT, DEFAULT_DISPLAY_PAR_N,
+          DEFAULT_DISPLAY_PAR_D, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_property (gobject_klass, PROP_IGNORE_ALPHA,
       g_param_spec_boolean ("ignore-alpha", "Ignore Alpha",