This fix solves an issue where a format that doesn't support the requested framerate would be selected. It ensures that we use the first format and framerate pair that supports the requested caps. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2331>