diff --git a/gst/videotestsrc/gstvideotestsrc.c b/gst/videotestsrc/gstvideotestsrc.c
index b3dacbe240..6951b3df96 100644
--- a/gst/videotestsrc/gstvideotestsrc.c
+++ b/gst/videotestsrc/gstvideotestsrc.c
@@ -708,6 +708,8 @@ gst_video_test_src_setcaps (GstBaseSrc * bsrc, GstCaps * caps)
     videotestsrc->bayer = TRUE;
     videotestsrc->x_invert = x_inv;
     videotestsrc->y_invert = y_inv;
+  } else {
+    goto unsupported_caps;
   }
 
   /* create chroma subsampler */
@@ -764,6 +766,11 @@ parse_failed:
     GST_DEBUG_OBJECT (bsrc, "failed to parse caps");
     return FALSE;
   }
+unsupported_caps:
+  {
+    GST_DEBUG_OBJECT (bsrc, "unsupported caps: %" GST_PTR_FORMAT, caps);
+    return FALSE;
+  }
 }
 
 static gboolean