summaryrefslogtreecommitdiff
path: root/gst/videotestsrc
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2010-05-11 16:12:49 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2010-05-12 10:32:48 +0200
commit199036481616b666f4c058a61bf8a7ee4ba6a5d3 (patch)
tree9b7d65fdc001680b97cad609ac19771c18dc3b1f /gst/videotestsrc
parent8ea2e94a7d08cd91e6e4d4a9e44d5285a71430c2 (diff)
videotestsrc: Fixate PAR to 1/1 if possible
Diffstat (limited to 'gst/videotestsrc')
-rw-r--r--gst/videotestsrc/gstvideotestsrc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gst/videotestsrc/gstvideotestsrc.c b/gst/videotestsrc/gstvideotestsrc.c
index 36d20f765..30c138acb 100644
--- a/gst/videotestsrc/gstvideotestsrc.c
+++ b/gst/videotestsrc/gstvideotestsrc.c
@@ -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