glfilter: Don't remove size fields from caps
authorJan Schmidt <jan@centricular.com>
Fri, 29 May 2015 16:23:44 +0000 (02:23 +1000)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:32:03 +0000 (19:32 +0000)
Instead of removing size fields, set them to the full range
like videoscale does, so the caps are clearly unfixed in
all cases.

gst-libs/gst/gl/gstglfilter.c

index 6df9c1b..9734107 100644 (file)
@@ -601,7 +601,14 @@ gst_gl_filter_caps_remove_size (GstCaps * caps)
       continue;
 
     st = gst_structure_copy (st);
-    gst_structure_remove_fields (st, "width", "height", NULL);
+    gst_structure_set (st, "width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+        "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
+
+    /* if pixel aspect ratio, make a range of it */
+    if (gst_structure_has_field (st, "pixel-aspect-ratio")) {
+      gst_structure_set (st, "pixel-aspect-ratio",
+          GST_TYPE_FRACTION_RANGE, 1, G_MAXINT, G_MAXINT, 1, NULL);
+    }
 
     gst_caps_append_structure_full (res, st, gst_caps_features_copy (f));
   }