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
This commit is contained in:
Jan Schmidt 2015-10-02 15:05:26 +10:00
parent caf7b6674b
commit 3f7138a6e4

View file

@ -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, "width", 320);
gst_structure_fixate_field_nearest_int (structure, "height", 240); gst_structure_fixate_field_nearest_int (structure, "height", 240);
if (gst_structure_has_field (structure, "framerate"))
gst_structure_fixate_field_nearest_fraction (structure, "framerate", 30, 1); 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")) if (gst_structure_has_field (structure, "pixel-aspect-ratio"))
gst_structure_fixate_field_nearest_fraction (structure, gst_structure_fixate_field_nearest_fraction (structure,