Skip to content

videodecoder: ensure 30 fps as default when setting default output format

gst_video_decoder_negotiate_default_caps() is meant to pick a default output format when we need one earlier because of an incoming GAP. It tries to use the input caps as a base if available and fallback to a default format (I420 1280x720@30) for the missing fields.

Unfortunatelly the framerate was not explicitly passed to gst_video_decoder_set_output_state() which is solely relying on the input format as reference to get the framerate. As a result, if not input format is available, or if it doesn't contain the framerate, we ended up with an output format with no framerate defined.

Fix this by manually setting the output fps if it hasn't been defined by gst_video_decoder_set_output_state().

Merge request reports