summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2015-10-02 15:05:26 +1000
committerJan Schmidt <jan@centricular.com>2015-10-02 15:05:26 +1000
commit3f7138a6e497e1d5635f7af798c3d2fc1d04d32b (patch)
tree19057663d266ec8b5786d07b932593df8ad52e73 /gst
parentcaf7b6674b95d17a46d275ff7f6861026a33f7f9 (diff)
videotestsrc: Don't fixate framerate if downstream didn't provide one
intersection with a downstream that accepts any video/x-raw caps with no further detail won't create a framerate field. If it's not in the caps, don't fixate it, just set it to 30/1
Diffstat (limited to 'gst')
-rw-r--r--gst/videotestsrc/gstvideotestsrc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gst/videotestsrc/gstvideotestsrc.c b/gst/videotestsrc/gstvideotestsrc.c
index f646b4c2c..2918264de 100644
--- a/gst/videotestsrc/gstvideotestsrc.c
+++ b/gst/videotestsrc/gstvideotestsrc.c
@@ -321,7 +321,11 @@ gst_video_test_src_src_fixate (GstBaseSrc * bsrc, 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, "framerate"))
+ gst_structure_fixate_field_nearest_fraction (structure, "framerate", 30, 1);
+ else
+ gst_structure_set (structure, "framerate", GST_TYPE_FRACTION, 30, 1, NULL);
if (gst_structure_has_field (structure, "pixel-aspect-ratio"))
gst_structure_fixate_field_nearest_fraction (structure,