avfvideosrc: Fix wrong default framerate value

Current default G_MAXINT is not a correct value under any circumstances.
This creates an issue with screen capture, during which we currently do
not get any framerate info causing G_MAXINT to show up, where elements
downstream can possibly misbehave - for example, `vtenc` causes
a kernel panic.
Replace with 30/1 to avoid such scenarios.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2944>
This commit is contained in:
Piotr Brzeziński 2022-08-25 14:24:25 +02:00 committed by GStreamer Marge Bot
parent 67eb1223c0
commit 0d72a6209c

View file

@ -1089,7 +1089,7 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
/* crank up to 11. This is what the presets do, but we don't use the presets
* in ios >= 7.0 */
gst_structure_fixate_field_nearest_int (structure, "height", G_MAXINT);
gst_structure_fixate_field_nearest_fraction (structure, "framerate", G_MAXINT, 1);
gst_structure_fixate_field_nearest_fraction (structure, "framerate", 30, 1);
return gst_caps_fixate (new_caps);
}