From f77860a4e220c8da4a3ae69e48084b327329e106 Mon Sep 17 00:00:00 2001 From: Anonymous Ignore This Date: Fri, 25 Jul 2003 01:53:34 +0000 Subject: [PATCH] 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. --- gst/registries/gstxmlregistry.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gst/registries/gstxmlregistry.c b/gst/registries/gstxmlregistry.c index 69022cd..516e662 100644 --- a/gst/registries/gstxmlregistry.c +++ b/gst/registries/gstxmlregistry.c @@ -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; -- 2.7.4