From b3806da2658c4c8dbdf7a0771df1c45a65ee0d14 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Sat, 17 Dec 2022 01:01:00 +0530 Subject: [PATCH] avfvideosrc: Report latency when doing screen capture There is no `device` when doing screen capture, but there is always an `input`, so use that to decide when we can reply to a latency query. Without this, the latency query just fails. 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 97f7e421f9..04057a9718 100644 --- a/subprojects/gst-plugins-bad/sys/applemedia/avfvideosrc.m +++ b/subprojects/gst-plugins-bad/sys/applemedia/avfvideosrc.m @@ -966,7 +966,7 @@ checked: BOOL result = NO; if (GST_QUERY_TYPE (query) == GST_QUERY_LATENCY) { - if (device != nil && caps != NULL) { + if (input != nil && caps != NULL) { GstClockTime min_latency, max_latency; min_latency = max_latency = latency;