adapter: Check if meta transform_func is NULL before using it
authorSebastian Dröge <sebastian@centricular.com>
Tue, 2 May 2017 11:27:14 +0000 (14:27 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 2 May 2017 11:27:14 +0000 (14:27 +0300)
https://bugzilla.gnome.org/show_bug.cgi?id=782050

libs/gst/base/gstadapter.c

index 6c56c41..e3dff28 100644 (file)
@@ -929,7 +929,7 @@ foreach_metadata (GstBuffer * inbuf, GstMeta ** meta, gpointer user_data)
     GST_DEBUG ("copying metadata %s", g_type_name (info->api));
   }
 
-  if (do_copy) {
+  if (do_copy && info->transform_func) {
     GstMetaTransformCopy copy_data = { FALSE, 0, -1 };
     GST_DEBUG ("copy metadata %s", g_type_name (info->api));
     /* simply copy then */