Skip to content

avfvideosrc: Fix wrong default framerate value

An issue discovered when trying to encode screen capture stream with vtenc - causes an immediate kernel panic, presumably because the VT API can't exactly handle a MAX_INT value correctly.

To reproduce: avfvideosrc capture-screen=true ! vtenc_h265 ! fakesink

Crashes the whole system immediately on an MBP M1 Pro running macOS 12.4.

Replaces the current default G_MAXINT, which is never going to be correct, with 0/1 30/1 which feels like a more sane default value.

The actual issue is, of course, us not getting any framerate info during screen capture, but this fix should be good enough until someone wishes to spend more time fixing the whole element / updating it to use non-deprecated APIs.

Edited by Piotr Brzeziński

Merge request reports