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/3591>
This commit is contained in:
Nirbheek Chauhan 2022-12-17 01:01:00 +05:30 committed by Tim-Philipp Müller
parent 79672414cc
commit 3cb73e02aa

View file

@ -933,7 +933,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;