ges: track-element: Fix FIXME about handling NULL factories to add properties

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5981>
This commit is contained in:
Thibault Saunier 2023-08-21 10:04:57 -04:00 committed by GStreamer Marge Bot
parent 4c8396da8e
commit ff9fec521b
2 changed files with 4 additions and 6 deletions

View file

@ -398,10 +398,9 @@ ges_effect_asset_id_get_type_and_bindesc (const char *id,
}
for (tmp = GST_BIN_CHILDREN (effect); tmp; tmp = tmp->next) {
GstElementFactory *factory =
gst_element_get_factory (GST_ELEMENT (tmp->data));
const gchar *klass =
gst_element_factory_get_metadata (factory, GST_ELEMENT_METADATA_KLASS);
gst_element_class_get_metadata (GST_ELEMENT_GET_CLASS (tmp->data),
GST_ELEMENT_METADATA_KLASS);
if (g_strrstr (klass, "Effect") || g_strrstr (klass, "Filter")) {
if (g_strrstr (klass, "Audio")) {

View file

@ -1084,11 +1084,10 @@ ges_track_element_add_child_props (GESTrackElement * self,
guint i;
factory = gst_element_get_factory (child);
/* FIXME: handle NULL factory */
klass = gst_element_factory_get_metadata (factory,
klass = gst_element_class_get_metadata (GST_ELEMENT_GET_CLASS (child),
GST_ELEMENT_METADATA_KLASS);
if (strv_find_str (blacklist, GST_OBJECT_NAME (factory))) {
if (factory && strv_find_str (blacklist, GST_OBJECT_NAME (factory))) {
GST_DEBUG_OBJECT (self, "%s blacklisted", GST_OBJECT_NAME (factory));
return;
}