mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-09-02 10:13:51 +00:00
sink: Only add processing latency if upstream is live
Only add it if upstream is live, otherwise leave the latency at 0. https://bugzilla.gnome.org/show_bug.cgi?id=640610
This commit is contained in:
parent
f79b871a6a
commit
4f3aea316a
1 changed files with 18 additions and 16 deletions
|
@ -1201,13 +1201,8 @@ gst_base_sink_query_latency (GstBaseSink * sink, gboolean * live,
|
||||||
* values to create the complete latency. */
|
* values to create the complete latency. */
|
||||||
min = us_min;
|
min = us_min;
|
||||||
max = us_max;
|
max = us_max;
|
||||||
}
|
|
||||||
if (l) {
|
|
||||||
/* we need to add the render delay if we are live */
|
|
||||||
min += render_delay;
|
|
||||||
if (max != -1)
|
|
||||||
max += render_delay;
|
|
||||||
|
|
||||||
|
if (l) {
|
||||||
if (max == -1 || min + processing_deadline <= max)
|
if (max == -1 || min + processing_deadline <= max)
|
||||||
min += processing_deadline;
|
min += processing_deadline;
|
||||||
else {
|
else {
|
||||||
|
@ -1225,6 +1220,13 @@ gst_base_sink_query_latency (GstBaseSink * sink, gboolean * live,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (l) {
|
||||||
|
/* we need to add the render delay if we are live */
|
||||||
|
min += render_delay;
|
||||||
|
if (max != -1)
|
||||||
|
max += render_delay;
|
||||||
|
}
|
||||||
|
}
|
||||||
gst_query_unref (query);
|
gst_query_unref (query);
|
||||||
} else {
|
} else {
|
||||||
GST_DEBUG_OBJECT (sink, "we are not yet ready for LATENCY query");
|
GST_DEBUG_OBJECT (sink, "we are not yet ready for LATENCY query");
|
||||||
|
|
Loading…
Reference in a new issue