capsfilter: Only set caps on the srcpad if it's activated in push mode

https://bugzilla.gnome.org/show_bug.cgi?id=722289
This commit is contained in:
Sebastian Dröge 2014-01-16 18:16:35 +01:00
parent ffe072f694
commit 210b0629fc

View file

@ -293,7 +293,8 @@ gst_capsfilter_prepare_buf (GstBaseTransform * trans, GstBuffer * input,
/* always return the input as output buffer */
*buf = input;
if (!gst_pad_has_current_caps (trans->sinkpad)) {
if (GST_PAD_MODE (trans->srcpad) == GST_PAD_MODE_PUSH
&& !gst_pad_has_current_caps (trans->sinkpad)) {
/* No caps. See if the output pad only supports fixed caps */
GstCapsFilter *filter = GST_CAPSFILTER (trans);
GstCaps *out_caps;