From a7f3571d0230229a9f46bc09976631d520684d46 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 20 Nov 2014 21:33:59 +0100 Subject: [PATCH] basetransform: Fix caps equality check Instead of checking if our outcaps are equivalent to the previous incaps, and if that is the case not setting any caps on the pad... compare against our previous outcaps because that's what we care about. Fixes some cases where the outcaps became equivalent to the previous incaps, but the previous outcaps were different and we were then sending buffers downstream that were corresponding to the caps we forgot to set on the pad. Resulting in crashes or image corruption. --- libs/gst/base/gstbasetransform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/gst/base/gstbasetransform.c b/libs/gst/base/gstbasetransform.c index 4153d91..285cdc4 100644 --- a/libs/gst/base/gstbasetransform.c +++ b/libs/gst/base/gstbasetransform.c @@ -1374,7 +1374,7 @@ gst_base_transform_setcaps (GstBaseTransform * trans, GstPad * pad, if (!(ret = gst_base_transform_configure_caps (trans, incaps, outcaps))) goto failed_configure; - if (!prev_incaps || !gst_caps_is_equal (outcaps, prev_incaps)) + if (!prev_incaps || !gst_caps_is_equal (outcaps, prev_outcaps)) /* let downstream know about our caps */ ret = gst_pad_set_caps (trans->srcpad, outcaps); } -- 2.7.4