underscore = strchr (str, '_');
str = strchr (str + 1, '%');
- if (str && (!underscore || (underscore && str < underscore))) {
+ if (str && (!underscore || str < underscore)) {
g_warning
("invalid name template %s: each of conversion specifications "
"must be separated by an underscore", name);
GstPadTemplate *new;
GstCaps *caps;
+ g_return_val_if_fail (g_type_is_a (pad_type, GST_TYPE_PAD), NULL);
+
if (!name_is_valid (pad_template->name_template, pad_template->presence))
return NULL;
|| direction == GST_PAD_SINK, NULL);
g_return_val_if_fail (presence == GST_PAD_ALWAYS
|| presence == GST_PAD_SOMETIMES || presence == GST_PAD_REQUEST, NULL);
+ g_return_val_if_fail (g_type_is_a (pad_type, GST_TYPE_PAD), NULL);
if (!name_is_valid (name_template, presence)) {
return NULL;