diff options
author | Thiago Santos <thiagoss@osg.samsung.com> | 2014-08-12 13:41:04 -0300 |
---|---|---|
committer | Thiago Santos <thiagoss@osg.samsung.com> | 2014-08-13 11:22:52 -0300 |
commit | 6bf3356967532d176a0dfd6150fe49be83171982 (patch) | |
tree | 1a8d7fbf3ef0d968101a3dadb1155b16976bb5c9 | |
parent | d280bba12657f20bc5de3419a09561364d9b0723 (diff) |
basetextoverlay: fix caps negotiation filter
-rw-r--r-- | ext/pango/gstbasetextoverlay.c | 22 |
1 files 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; |