mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
imagefreeze: Correctly answer the LATENCY query
We never run as a live element, even if upstream is live, and never output any buffers with latency but immediately generate buffers as fast as we can according to the negotiated framerate. Passing the query upstream would proxy whatever mode of operation upstream has, which has nothing to do with how we produce buffers. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/653>
This commit is contained in:
parent
ca61a76987
commit
06b29a4aef
1 changed files with 4 additions and 5 deletions
|
@ -536,11 +536,10 @@ gst_image_freeze_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
|||
break;
|
||||
}
|
||||
case GST_QUERY_LATENCY:
|
||||
/* This will only return an accurate latency for the first buffer since
|
||||
* all further buffers outputted by us are just copies of that one, and
|
||||
* the latency is 0 in that case. However, latency changes are not
|
||||
* straightforward, so let's do the conservative fix for now. */
|
||||
ret = gst_pad_query_default (pad, parent, query);
|
||||
/* We never run as a live element, even if upstream is live, and never
|
||||
* output any buffers with latency but immediately generate buffers as
|
||||
* fast as we can according to the negotiated framerate */
|
||||
gst_query_set_latency (query, FALSE, 0, GST_CLOCK_TIME_NONE);
|
||||
break;
|
||||
default:
|
||||
ret = FALSE;
|
||||
|
|
Loading…
Reference in a new issue