videoscale: Don't call NULL GstMeta transform function
authorSebastian Dröge <sebastian@centricular.com>
Tue, 18 Aug 2020 07:26:48 +0000 (10:26 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 18 Aug 2020 07:26:48 +0000 (10:26 +0300)
It's optional and if it does not exist then no transformation is
possible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/790>

gst/videoscale/gstvideoscale.c

index 0a67b44..198a767 100644 (file)
@@ -543,7 +543,9 @@ gst_video_scale_transform_meta (GstBaseTransform * trans, GstBuffer * inbuf,
     GstVideoMetaTransform trans =
         { &videofilter->in_info, &videofilter->out_info };
 
-    return info->transform_func (outbuf, meta, inbuf, _scale_quark, &trans);
+    if (info->transform_func)
+      return info->transform_func (outbuf, meta, inbuf, _scale_quark, &trans);
+    return FALSE;
   }
 
   /* No need to transform, we can safely copy this meta */