diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2020-08-18 10:27:52 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2020-08-18 10:27:52 +0300 |
commit | 85a6e95c7d84e40eb4cf37a299884c0833a23eff (patch) | |
tree | 97c3b4c18ef9ffc7322e047333465d332a9c5ea3 /gst | |
parent | 91972c91aa56763cdcfa7b70a49960b4f2c22e9b (diff) |
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>
Diffstat (limited to 'gst')
-rw-r--r-- | gst/rtp/gstrtputils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gst/rtp/gstrtputils.c b/gst/rtp/gstrtputils.c index 044d1b30a..7ad981afd 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 */ |