Prevent the registry from enter an infinite loop. Somehow the type find code is getting messed up, but that should c...

Original commit message from CVS:
Prevent the registry from enter an infinite loop.  Somehow the
type find code is getting messed up, but that should cause
gstreamer to become unusable.
This commit is contained in:
Anonymous Ignore This 2003-07-25 01:53:34 +00:00
parent a331a7a82e
commit f77860a4e2

View file

@ -709,9 +709,14 @@ gst_type_type_find_dummy (GstBuffer *buffer, gpointer priv)
if (gst_plugin_feature_ensure_loaded (GST_PLUGIN_FEATURE (factory))) {
if (factory->typefindfunc) {
GstCaps *res = factory->typefindfunc (buffer, factory);
if (res)
return res;
if (factory->typefindfunc == gst_type_type_find_dummy) {
GST_CAT_WARNING (GST_CAT_TYPES, "GstTypeFactory %s for mime %s exts %s does not install a valid typefindfunc",
factory->feature.name, factory->mime, factory->exts);
} else {
GstCaps *res = factory->typefindfunc (buffer, factory);
if (res)
return res;
}
}
}
return NULL;