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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3589>
This commit is contained in:
Nirbheek Chauhan 2022-12-17 01:01:00 +05:30 committed by GStreamer Marge Bot
parent 171a626c6c
commit b3806da265

View file

@ -966,7 +966,7 @@ checked:
BOOL result = NO; BOOL result = NO;
if (GST_QUERY_TYPE (query) == GST_QUERY_LATENCY) { if (GST_QUERY_TYPE (query) == GST_QUERY_LATENCY) {
if (device != nil && caps != NULL) { if (input != nil && caps != NULL) {
GstClockTime min_latency, max_latency; GstClockTime min_latency, max_latency;
min_latency = max_latency = latency; min_latency = max_latency = latency;