mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 04:52:28 +00:00
video: Fix latency query handling if the element's own max_latency is GST_CLOCK_TIME_NONE
This commit is contained in:
parent
71900c4342
commit
bcef106f73
2 changed files with 7 additions and 3 deletions
|
@ -1169,7 +1169,9 @@ gst_video_decoder_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
|||
|
||||
GST_OBJECT_LOCK (dec);
|
||||
min_latency += dec->priv->min_latency;
|
||||
if (max_latency != GST_CLOCK_TIME_NONE) {
|
||||
if (dec->priv->max_latency == GST_CLOCK_TIME_NONE) {
|
||||
max_latency = GST_CLOCK_TIME_NONE;
|
||||
} else if (max_latency != GST_CLOCK_TIME_NONE) {
|
||||
max_latency += dec->priv->max_latency;
|
||||
}
|
||||
GST_OBJECT_UNLOCK (dec);
|
||||
|
|
|
@ -1043,8 +1043,10 @@ gst_video_encoder_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
|||
|
||||
GST_OBJECT_LOCK (enc);
|
||||
min_latency += priv->min_latency;
|
||||
if (max_latency != GST_CLOCK_TIME_NONE) {
|
||||
max_latency += priv->max_latency;
|
||||
if (enc->priv->max_latency == GST_CLOCK_TIME_NONE) {
|
||||
max_latency = GST_CLOCK_TIME_NONE;
|
||||
} else if (max_latency != GST_CLOCK_TIME_NONE) {
|
||||
max_latency += enc->priv->max_latency;
|
||||
}
|
||||
GST_OBJECT_UNLOCK (enc);
|
||||
|
||||
|
|
Loading…
Reference in a new issue