Skip to content

avfvideosrc: fix wrong framerate selected for caps

dionet requested to merge dionet/gstreamer:fix-avfvideosrc-fps into main

Some USB webcams and HDMI capture devices provide different formats that support different framerate ranges for the same resolution. Currently, avfvideosrc has an issue where it selects a format that doesn't support the requested framerate if a previous format that supports it was found. This meant that avfvideosrc would output a video source that didn't respect the requested framerate.

This merge request solves that issue. Tested on a mac mini M1 using the following capture devices:

  • Logitech Webcam C930e
  • Macrosilicon MS2109 HDMI to USB Before applying the fix, requesting a framerate of 30/1 would only output around 5fps.

Please consider backporting this to 1.20.

Merge request reports