From 8a81e5b9ffbfb88f9d4ea2e0fcd4628e6922ef81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Brzezi=C5=84ski?= Date: Thu, 25 Aug 2022 14:24:25 +0200 Subject: [PATCH] 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: --- subprojects/gst-plugins-bad/sys/applemedia/avfvideosrc.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/sys/applemedia/avfvideosrc.m b/subprojects/gst-plugins-bad/sys/applemedia/avfvideosrc.m index e357eb035e..da205a5cbd 100644 --- a/subprojects/gst-plugins-bad/sys/applemedia/avfvideosrc.m +++ b/subprojects/gst-plugins-bad/sys/applemedia/avfvideosrc.m @@ -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); }