From af7fee714dbb8d31ac84cc4a9b72bf0371a83474 Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Fri, 27 Jul 2012 11:31:13 +0200 Subject: [PATCH] videocrop: Don't return NULL from _transform_caps If _transform_caps () returns NULL, the basetransform _transform_caps tries to call gst_caps_is_subset () with a NULL subset which hits an assertion. --- gst/videocrop/gstvideocrop.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gst/videocrop/gstvideocrop.c b/gst/videocrop/gstvideocrop.c index 77e6d08..baca7e8 100644 --- a/gst/videocrop/gstvideocrop.c +++ b/gst/videocrop/gstvideocrop.c @@ -609,12 +609,7 @@ gst_video_crop_transform_caps (GstBaseTransform * trans, gst_caps_append_structure (other_caps, new_structure); } - if (gst_caps_is_empty (other_caps)) { - gst_caps_unref (other_caps); - other_caps = NULL; - } - - if (other_caps && filter_caps) { + if (!gst_caps_is_empty (other_caps) && filter_caps) { GstCaps *tmp = gst_caps_intersect_full (filter_caps, other_caps, GST_CAPS_INTERSECT_FIRST); gst_caps_replace (&other_caps, tmp); -- 2.7.4