videotestsrc: Fixate PAR to 1/1 if possible
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 11 May 2010 14:12:49 +0000 (16:12 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 12 May 2010 08:32:48 +0000 (10:32 +0200)
gst/videotestsrc/gstvideotestsrc.c

index 36d20f7..30c138a 100644 (file)
@@ -297,6 +297,9 @@ gst_video_test_src_src_fixate (GstPad * pad, GstCaps * caps)
   gst_structure_fixate_field_nearest_int (structure, "width", 320);
   gst_structure_fixate_field_nearest_int (structure, "height", 240);
   gst_structure_fixate_field_nearest_fraction (structure, "framerate", 30, 1);
+  if (gst_structure_has_field (structure, "pixel-aspect-ratio"))
+    gst_structure_fixate_field_nearest_fraction (structure,
+        "pixel-aspect-ratio", 1, 1);
 }
 
 static void