diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2013-08-30 12:35:14 +0200 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2013-08-30 12:35:14 +0200 |
commit | 63f38155df9cb281e4d48dbc14389e66446436f2 (patch) | |
tree | c1e9bdd098a86c3c46af4828367a262bdebfaaaa /libs/gst/base/gstbasetransform.c | |
parent | ab458c2ee68b132b62e498fcf293c2ec44477faf (diff) |
Imported Upstream version 1.1.4upstream/1.1.4
Diffstat (limited to 'libs/gst/base/gstbasetransform.c')
-rw-r--r-- | libs/gst/base/gstbasetransform.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libs/gst/base/gstbasetransform.c b/libs/gst/base/gstbasetransform.c index df672bf..83420dc 100644 --- a/libs/gst/base/gstbasetransform.c +++ b/libs/gst/base/gstbasetransform.c @@ -1298,7 +1298,7 @@ gst_base_transform_setcaps (GstBaseTransform * trans, GstPad * pad, GstCaps * incaps) { GstBaseTransformPrivate *priv = trans->priv; - GstCaps *outcaps; + GstCaps *outcaps, *prevcaps; gboolean ret = TRUE; GST_DEBUG_OBJECT (pad, "have new caps %p %" GST_PTR_FORMAT, incaps, incaps); @@ -1321,8 +1321,14 @@ gst_base_transform_setcaps (GstBaseTransform * trans, GstPad * pad, if (!(ret = gst_base_transform_configure_caps (trans, incaps, outcaps))) goto failed_configure; - /* let downstream know about our caps */ - ret = gst_pad_set_caps (trans->srcpad, outcaps); + prevcaps = gst_pad_get_current_caps (trans->srcpad); + + if (!prevcaps || !gst_caps_is_equal (outcaps, prevcaps)) + /* let downstream know about our caps */ + ret = gst_pad_set_caps (trans->srcpad, outcaps); + + if (prevcaps) + gst_caps_unref (prevcaps); if (ret) { /* try to get a pool when needed */ |