From 85a6e95c7d84e40eb4cf37a299884c0833a23eff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 18 Aug 2020 10:27:52 +0300 Subject: [PATCH] rtputils: Don't call NULL GstMeta transform function It's optional and if it does not exist then no transformation is possible. Part-of: --- gst/rtp/gstrtputils.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/rtp/gstrtputils.c b/gst/rtp/gstrtputils.c index 044d1b30a1..7ad981afd0 100644 --- a/gst/rtp/gstrtputils.c +++ b/gst/rtp/gstrtputils.c @@ -39,8 +39,9 @@ foreach_metadata_copy (GstBuffer * inbuf, GstMeta ** meta, gpointer user_data) const GstMetaInfo *info = (*meta)->info; const gchar *const *tags = gst_meta_api_type_get_tags (info->api); - if (!tags || (copy_tag != 0 && g_strv_length ((gchar **) tags) == 1 - && gst_meta_api_type_has_tag (info->api, copy_tag))) { + if (info->transform_func && (!tags || (copy_tag != 0 + && g_strv_length ((gchar **) tags) == 1 + && gst_meta_api_type_has_tag (info->api, copy_tag)))) { GstMetaTransformCopy copy_data = { FALSE, 0, -1 }; GST_DEBUG_OBJECT (element, "copy metadata %s", g_type_name (info->api)); /* simply copy then */