basetransform: fix critical if transform_caps() returned NULL

klass->transform_caps() may return NULL, which was raising this
critical:

  GStreamer-CRITICAL **: 12:23:56.243: gst_caps_is_subset: assertion 'subset != NULL' failed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2537>
This commit is contained in:
Guillaume Desmottes 2022-05-31 14:27:51 +02:00 committed by Tim-Philipp Müller
parent a4d7ae7af4
commit eeb8eb0b9d

View file

@ -475,7 +475,7 @@ gst_base_transform_transform_caps (GstBaseTransform * trans,
GST_LOG_OBJECT (trans, " to: %" GST_PTR_FORMAT, ret);
#ifdef GST_ENABLE_EXTRA_CHECKS
if (filter) {
if (ret && filter) {
if (!gst_caps_is_subset (ret, filter)) {
GstCaps *intersection;