From 906bbd3817c86e64d1bfa57570469055456addfe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 28 Nov 2017 23:37:47 +0000 Subject: [PATCH] tools: gst-inspect: fix readable flag printing for pad properties --- tools/gst-inspect.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c index 7592049..b2d328c 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -305,17 +305,19 @@ print_object_properties_info (GObject * obj, GObjectClass * obj_class, first_flag = TRUE; n_print ("flags: "); - if (param->flags & G_PARAM_READABLE && obj != NULL) { + readable = ! !(param->flags & G_PARAM_READABLE); + if (readable && obj != NULL) { g_object_get_property (obj, param->name, &value); - readable = TRUE; - g_print ("%s%s", (first_flag) ? "" : ", ", _("readable")); - first_flag = FALSE; } else { /* if we can't read the property value, assume it's set to the default * (which might not be entirely true for sub-classes, but that's an * unlikely corner-case anyway) */ g_param_value_set_default (param, &value); } + if (readable) { + g_print ("%s%s", (first_flag) ? "" : ", ", _("readable")); + first_flag = FALSE; + } if (param->flags & G_PARAM_WRITABLE) { g_print ("%s%s", (first_flag) ? "" : ", ", _("writable")); first_flag = FALSE; -- 2.7.4