Index: sys/v4l/gstv4lsrc.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/sys/v4l/gstv4lsrc.c,v
retrieving revision 1.107
diff -u -r1.107 gstv4lsrc.c
--- sys/v4l/gstv4lsrc.c	21 Aug 2007 15:43:24 -0000	1.107
+++ sys/v4l/gstv4lsrc.c	1 Jan 2008 16:43:17 -0000
@@ -410,7 +410,7 @@
 
   list = gst_caps_new_empty ();
   for (item = v4lsrc->colorspaces; item != NULL; item = item->next) {
-    GstCaps *one;
+    GstCaps *one, *two;
 
     one = gst_v4lsrc_palette_to_caps (GPOINTER_TO_INT (item->data));
     if (!one) {
@@ -424,19 +424,6 @@
         vcap->minwidth, vcap->maxwidth, vcap->minheight, vcap->maxheight,
         fps_n, fps_d, GPOINTER_TO_INT (item->data));
 
-    if (vcap->minwidth < vcap->maxwidth) {
-      gst_caps_set_simple (one, "width", GST_TYPE_INT_RANGE, vcap->minwidth,
-          vcap->maxwidth, NULL);
-    } else {
-      gst_caps_set_simple (one, "width", G_TYPE_INT, vcap->minwidth, NULL);
-    }
-    if (vcap->minheight < vcap->maxheight) {
-      gst_caps_set_simple (one, "height", GST_TYPE_INT_RANGE, vcap->minheight,
-          vcap->maxheight, NULL);
-    } else {
-      gst_caps_set_simple (one, "height", G_TYPE_INT, vcap->minheight, NULL);
-    }
-
     if (v4lsrc->autoprobe_fps) {
       GstStructure *structure = gst_caps_get_structure (one, 0);
 
@@ -451,7 +438,16 @@
           1, 1, 100, 1, NULL);
     }
 
-    GST_DEBUG_OBJECT (v4lsrc, "caps: %" GST_PTR_FORMAT, one);
+    two = gst_caps_copy (one);
+    /* set the width and height for the maximum */
+    gst_caps_set_simple (two, "width", G_TYPE_INT, vcap->maxwidth, NULL);
+    gst_caps_set_simple (two, "height", G_TYPE_INT, vcap->maxheight, NULL);
+    GST_DEBUG_OBJECT (v4lsrc, "Adding caps maximum resolution: %" GST_PTR_FORMAT, two);
+    gst_caps_append (list, two);
+    /* set the width and height for the minimum */
+    gst_caps_set_simple (one, "width", G_TYPE_INT, vcap->minwidth, NULL);
+    gst_caps_set_simple (one, "height", G_TYPE_INT, vcap->minheight, NULL);
+    GST_DEBUG_OBJECT (v4lsrc, "Adding caps minimum resolution: %" GST_PTR_FORMAT, one);
     gst_caps_append (list, one);
   }
 
