The glib docs are not clear on this, but the qsort man-page is - the
GCompareDataFunc does not get the strings, but pointers to them.
return presets;
}
+static gint
+compare_strings (gchar ** a, gchar ** b, gpointer user_data)
+{
+ return g_strcmp0 (*a, *b);
+}
+
/* get a list of all supported preset names for an element */
static gchar **
gst_preset_default_get_preset_names (GstPreset * preset)
/* sort the array now */
g_qsort_with_data (groups, num_groups, sizeof (gchar *),
- (GCompareDataFunc) strcmp, NULL);
+ (GCompareDataFunc) compare_strings, NULL);
return groups;