From 467fabf6c18f7812d674d1e1df0d1373ab1012ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 29 Apr 2012 13:28:09 +0100 Subject: [PATCH] gstobject: give the 20th queue element a different name than the first queue2 one Fixes issue with the default naming scheme. --- gst/gstobject.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gst/gstobject.c b/gst/gstobject.c index 6f58e3dac9..e8d4880a8b 100644 --- a/gst/gstobject.c +++ b/gst/gstobject.c @@ -559,7 +559,14 @@ gst_object_set_name_default (GstObject * object) type_name = g_quark_to_string (q); if (strncmp (type_name, "Gst", 3) == 0) type_name += 3; - name = g_strdup_printf ("%s%d", type_name, count); + /* give the 20th "queue" element and the first "queue2" different names */ + l = strlen (type_name); + if (l > 0 && g_ascii_isdigit (type_name[l - 1])) { + name = g_strdup_printf ("%s-%d", type_name, count); + } else { + name = g_strdup_printf ("%s%d", type_name, count); + } + l = strlen (name); for (i = 0; i < l; i++) name[i] = g_ascii_tolower (name[i]);