mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
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:
parent
caf7b6674b
commit
3f7138a6e4
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
||||
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,
|
||||
|
|
Loading…
Reference in a new issue