rtputils: Don't call NULL GstMeta transform function

It's optional and if it does not exist then no transformation is
possible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/701>
This commit is contained in:
Sebastian Dröge 2020-08-18 10:27:52 +03:00
parent 91972c91aa
commit 85a6e95c7d

View file

@ -39,8 +39,9 @@ foreach_metadata_copy (GstBuffer * inbuf, GstMeta ** meta, gpointer user_data)
const GstMetaInfo *info = (*meta)->info; const GstMetaInfo *info = (*meta)->info;
const gchar *const *tags = gst_meta_api_type_get_tags (info->api); const gchar *const *tags = gst_meta_api_type_get_tags (info->api);
if (!tags || (copy_tag != 0 && g_strv_length ((gchar **) tags) == 1 if (info->transform_func && (!tags || (copy_tag != 0
&& gst_meta_api_type_has_tag (info->api, copy_tag))) { && g_strv_length ((gchar **) tags) == 1
&& gst_meta_api_type_has_tag (info->api, copy_tag)))) {
GstMetaTransformCopy copy_data = { FALSE, 0, -1 }; GstMetaTransformCopy copy_data = { FALSE, 0, -1 };
GST_DEBUG_OBJECT (element, "copy metadata %s", g_type_name (info->api)); GST_DEBUG_OBJECT (element, "copy metadata %s", g_type_name (info->api));
/* simply copy then */ /* simply copy then */