--- gstreamer1-1.8.2/libs/gst/base/gstbasetransform.c.old	2017-02-03 16:07:00.204590931 +0530
+++ gstreamer1-1.8.2/libs/gst/base/gstbasetransform.c	2017-02-03 16:09:47.310784902 +0530
@@ -742,7 +742,7 @@ gst_base_transform_query_caps (GstBaseTr
   if (peerfilter)
     gst_caps_unref (peerfilter);
 
-  if (peercaps) {
+  if (peercaps && !gst_caps_is_empty (peercaps)) {
     GST_DEBUG_OBJECT (pad, "peer caps  %" GST_PTR_FORMAT, peercaps);
 
     /* filtered against our padtemplate on the other side */
