From 5dfe92a5798e9179feeced07da98018140ff8a2f Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 11 May 2021 11:28:57 +0200 Subject: [PATCH] gtk: Fix "pixel-aspect-ratio" property range Fix the arguments passed to gst_param_spec_fraction in the incorrect order. Part-of: --- subprojects/gst-plugins-good/docs/gst_plugins_cache.json | 2 +- subprojects/gst-plugins-good/ext/gtk/gstgtkbasesink.c | 6 +++--- subprojects/gst-plugins-good/ext/gtk/gtkgstbasewidget.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/subprojects/gst-plugins-good/docs/gst_plugins_cache.json b/subprojects/gst-plugins-good/docs/gst_plugins_cache.json index d558a53..324d0f3 100644 --- a/subprojects/gst-plugins-good/docs/gst_plugins_cache.json +++ b/subprojects/gst-plugins-good/docs/gst_plugins_cache.json @@ -7209,7 +7209,7 @@ "controllable": false, "default": "0/1", "max": "2147483647/1", - "min": "0/1", + "min": "0/2147483647", "mutable": "null", "readable": true, "type": "GstFraction", diff --git a/subprojects/gst-plugins-good/ext/gtk/gstgtkbasesink.c b/subprojects/gst-plugins-good/ext/gtk/gstgtkbasesink.c index bc9a6a4..ff98dae 100644 --- a/subprojects/gst-plugins-good/ext/gtk/gstgtkbasesink.c +++ b/subprojects/gst-plugins-good/ext/gtk/gstgtkbasesink.c @@ -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", diff --git a/subprojects/gst-plugins-good/ext/gtk/gtkgstbasewidget.c b/subprojects/gst-plugins-good/ext/gtk/gtkgstbasewidget.c index de85c3f..0fbe131 100644 --- a/subprojects/gst-plugins-good/ext/gtk/gtkgstbasewidget.c +++ b/subprojects/gst-plugins-good/ext/gtk/gtkgstbasewidget.c @@ -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", -- 2.7.4