From 86b9f78788cd8e55e289cf01c05eeac1b00e8da8 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Fri, 19 Jul 2019 21:57:09 -0400 Subject: [PATCH] identity: Non-live upstream have no max latency sync=TRUE implementation changes the latency query of a non-live upstream into live, though it wrongly set the upstream max latency to 0. As non-live sources won't loose data if we wait longer, this should have been reported as have no max latency limite (-1). --- plugins/elements/gstidentity.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/elements/gstidentity.c b/plugins/elements/gstidentity.c index bf6ba40..8da7cf0 100644 --- a/plugins/elements/gstidentity.c +++ b/plugins/elements/gstidentity.c @@ -976,8 +976,12 @@ gst_identity_query (GstBaseTransform * base, GstPadDirection direction, GST_OBJECT_LOCK (identity); if (live) identity->upstream_latency = min; - else + else { identity->upstream_latency = 0; + /* if we interface a non-live source, then we know there is no + * limit in the maximum latency */ + max = -1; + } GST_OBJECT_UNLOCK (identity); gst_query_set_latency (query, live || identity->sync, min, max); -- 2.7.4