Index: libs/gst/base/gstbasetransform.c
===================================================================
RCS file: /cvs/gstreamer/gstreamer/libs/gst/base/gstbasetransform.c,v
retrieving revision 1.89
diff -u -r1.89 gstbasetransform.c
--- libs/gst/base/gstbasetransform.c	24 Aug 2006 10:40:31 -0000	1.89
+++ libs/gst/base/gstbasetransform.c	8 Sep 2006 10:38:46 -0000
@@ -1046,6 +1059,7 @@
   GstBaseTransform *trans;
   GstFlowReturn res;
   guint new_size;
+  gboolean issinkcaps = TRUE;
 
   trans = GST_BASE_TRANSFORM (gst_pad_get_parent (pad));
 
@@ -1061,9 +1075,30 @@
   else
     GST_DEBUG_OBJECT (trans, "... and offset %" G_GUINT64_FORMAT, offset);
 
+  /* if have_same_caps was previously set to TRUE we need to double check if it
+   * hasn't changed */
+  if (trans->have_same_caps) {
+    GstCaps * sinkcaps;
+
+    GST_OBJECT_LOCK (trans->sinkpad);
+    sinkcaps = GST_PAD_CAPS (trans->sinkpad);
+    GST_LOG_OBJECT (trans, "sinkcaps:%"GST_PTR_FORMAT, sinkcaps);
+    issinkcaps = sinkcaps && (gst_caps_is_equal (sinkcaps, caps));    
+    GST_OBJECT_UNLOCK (trans->sinkpad);
+  }
+
+  GST_LOG_OBJECT (trans, "negotiated:%d , passthrough:%d , have_same_caps:%d , always_in_place:%d, caps:%"GST_PTR_FORMAT,
+		  trans->negotiated, trans->passthrough, trans->have_same_caps,
+		  trans->always_in_place, caps);
+
   /* before any buffers are pushed, have_same_caps is TRUE; allocating can trigger
    * a renegotiation and change that to FALSE */
-  if (trans->have_same_caps) {
+
+  /* This seems wrong, from all debug logs, have_same_caps is initialized to FALSE*/
+
+  /* checking against trans->have_same_caps is not enough !! It should also
+   *  check to see if the requested caps are equal to the sink caps */
+  if (trans->have_same_caps && issinkcaps) {
     /* request a buffer with the same caps */
     GST_DEBUG_OBJECT (trans, "requesting buffer with same caps, size %d", size);
 
