playbin: subtitleoverlay: don't segfault in incorrectly init'ed plugins
https://bugzilla.gnome.org/show_bug.cgi?id=683865
This commit is contained in:
parent
77c3a225c8
commit
6e469b2ac5
@ -191,11 +191,13 @@ _is_renderer (GstElementFactory * factory)
|
|||||||
klass = gst_element_factory_get_klass (factory);
|
klass = gst_element_factory_get_klass (factory);
|
||||||
name = gst_plugin_feature_get_name (GST_PLUGIN_FEATURE_CAST (factory));
|
name = gst_plugin_feature_get_name (GST_PLUGIN_FEATURE_CAST (factory));
|
||||||
|
|
||||||
if (strstr (klass, "Overlay/Subtitle") != NULL ||
|
if (klass != NULL) {
|
||||||
strstr (klass, "Overlay/SubPicture") != NULL)
|
if (strstr (klass, "Overlay/Subtitle") != NULL ||
|
||||||
return TRUE;
|
strstr (klass, "Overlay/SubPicture") != NULL)
|
||||||
if (strcmp (name, "textoverlay") == 0)
|
return TRUE;
|
||||||
return TRUE;
|
if (strcmp (name, "textoverlay") == 0)
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,7 +208,7 @@ _is_parser (GstElementFactory * factory)
|
|||||||
|
|
||||||
klass = gst_element_factory_get_klass (factory);
|
klass = gst_element_factory_get_klass (factory);
|
||||||
|
|
||||||
if (strstr (klass, "Parser/Subtitle") != NULL)
|
if (klass != NULL && strstr (klass, "Parser/Subtitle") != NULL)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user