videotestsrc: Fixate interlaced, chroma-site and color-matrix fields if necessary
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Sat, 22 May 2010 08:05:40 +0000 (10:05 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Sat, 22 May 2010 08:05:40 +0000 (10:05 +0200)
gst/videotestsrc/gstvideotestsrc.c

index 30c138a..15292c8 100644 (file)
@@ -300,6 +300,13 @@ gst_video_test_src_src_fixate (GstPad * pad, GstCaps * caps)
   if (gst_structure_has_field (structure, "pixel-aspect-ratio"))
     gst_structure_fixate_field_nearest_fraction (structure,
         "pixel-aspect-ratio", 1, 1);
+  if (gst_structure_has_field (structure, "color-matrix"))
+    gst_structure_fixate_field_string (structure, "color-matrix", "sdtv");
+  if (gst_structure_has_field (structure, "chroma-site"))
+    gst_structure_fixate_field_string (structure, "chroma-site", "mpeg2");
+
+  if (gst_structure_has_field (structure, "interlaced"))
+    gst_structure_fixate_field_boolean (structure, "interlaced", FALSE);
 }
 
 static void