extension);
for (l = type_list; l; l = next) {
+ const gchar *const *ext;
GstTypeFindFactory *factory;
- gint i;
- gchar **ext;
next = l->next;
GST_LOG_OBJECT (obj, "testing factory %s for extension %s",
GST_OBJECT_NAME (factory), extension);
- for (i = 0; ext[i]; i++) {
- if (strcmp (ext[i], extension) == 0) {
+ while (*ext != NULL) {
+ if (strcmp (*ext, extension) == 0) {
/* found extension, move in front */
GST_LOG_OBJECT (obj, "moving typefind for extension %s to head",
extension);
pos++;
break;
}
+ ++ext;
}
}
}
for (l = type_list; l; l = g_list_next (l)) {
GstTypeFindFactory *factory;
- gchar **ext;
- gint i;
+ const gchar *const *ext;
factory = GST_TYPE_FIND_FACTORY (l->data);
/* there are extension, see if one of them matches the requested
* extension */
- for (i = 0; ext[i]; i++) {
- if (strcmp (ext[i], extension) == 0) {
+ while (*ext != NULL) {
+ if (strcmp (*ext, extension) == 0) {
/* we found a matching extension, take the caps */
if ((result = gst_type_find_factory_get_caps (factory))) {
gst_caps_ref (result);
goto done;
}
}
+ ++ext;
}
}
done: