mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-03 01:02:19 +00:00
Fix the case where a typefind function could not be loaded.
Original commit message from CVS: Fix the case where a typefind function could not be loaded.
This commit is contained in:
parent
5195076a1c
commit
50fad82368
1 changed files with 8 additions and 5 deletions
|
@ -318,17 +318,20 @@ gst_type_factory_unload_thyself (GstPluginFeature *feature)
|
||||||
static GstCaps*
|
static GstCaps*
|
||||||
gst_type_type_find_dummy (GstBuffer *buffer, gpointer priv)
|
gst_type_type_find_dummy (GstBuffer *buffer, gpointer priv)
|
||||||
{
|
{
|
||||||
|
GstCaps *res = NULL;
|
||||||
GstTypeFactory *factory = (GstTypeFactory *)priv;
|
GstTypeFactory *factory = (GstTypeFactory *)priv;
|
||||||
|
|
||||||
GST_DEBUG (GST_CAT_TYPES,"gsttype: need to load typefind function for %s", factory->mime);
|
GST_DEBUG (GST_CAT_TYPES,"gsttype: need to load typefind function for %s", factory->mime);
|
||||||
|
|
||||||
if (gst_plugin_feature_ensure_loaded (GST_PLUGIN_FEATURE (factory))) {
|
if (gst_plugin_feature_ensure_loaded (GST_PLUGIN_FEATURE (factory))) {
|
||||||
if (factory->typefindfunc) {
|
if (factory->typefindfunc == gst_type_type_find_dummy) {
|
||||||
GstCaps *res = factory->typefindfunc (buffer, factory);
|
/* looks like we didn't get a real typefind function */
|
||||||
if (res)
|
g_warning ("could not load valid typefind function for %s\n", factory->mime);
|
||||||
return res;
|
}
|
||||||
|
else if (factory->typefindfunc) {
|
||||||
|
res = factory->typefindfunc (buffer, factory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue