capsfilter: Only set caps on the srcpad if it's activated in push mode
authorSebastian Dröge <sebastian@centricular.com>
Thu, 16 Jan 2014 17:16:35 +0000 (18:16 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 16 Jan 2014 17:16:35 +0000 (18:16 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=722289

plugins/elements/gstcapsfilter.c

index 4cd8b71..db697ae 100644 (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;