From 6bf3356967532d176a0dfd6150fe49be83171982 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Tue, 12 Aug 2014 13:41:04 -0300 Subject: basetextoverlay: fix caps negotiation filter --- ext/pango/gstbasetextoverlay.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c index eb4984acb..da371afa6 100644 --- a/ext/pango/gstbasetextoverlay.c +++ b/ext/pango/gstbasetextoverlay.c @@ -1294,12 +1294,6 @@ gst_base_text_overlay_get_src_caps (GstPad * pad, GstBaseTextOverlay * overlay, /* if peer returns ANY caps, return filtered sink pad template caps */ caps = gst_caps_copy (gst_pad_get_pad_template_caps (sinkpad)); - if (filter) { - GstCaps *intersection = gst_caps_intersect_full (filter, caps, - GST_CAPS_INTERSECT_FIRST); - gst_caps_unref (caps); - caps = intersection; - } } else { @@ -1316,16 +1310,16 @@ gst_base_text_overlay_get_src_caps (GstPad * pad, GstBaseTextOverlay * overlay, } else { /* no peer, our padtemplate is enough then */ caps = gst_pad_get_pad_template_caps (pad); - if (filter) { - GstCaps *intersection; - - intersection = - gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST); - gst_caps_unref (caps); - caps = intersection; - } } + if (filter) { + GstCaps *intersection; + + intersection = + gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST); + gst_caps_unref (caps); + caps = intersection; + } GST_DEBUG_OBJECT (overlay, "returning %" GST_PTR_FORMAT, caps); return caps; -- cgit v1.2.3