From 5335a8b34b7e564098849faf7d6d035779cf655d Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 25 Jun 2008 11:50:06 +0000 Subject: [PATCH] gst/gstbin.c: Only care about latency min and max when the sink is actually a live sink. Original commit message from CVS: * gst/gstbin.c: (bin_query_latency_fold): Only care about latency min and max when the sink is actually a live sink. --- ChangeLog | 6 ++++++ gst/gstbin.c | 18 ++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5e78243f62..abf23bec3b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-06-25 Wim Taymans + + * gst/gstbin.c: (bin_query_latency_fold): + Only care about latency min and max when the sink is actually a live + sink. + 2008-06-25 Wim Taymans * docs/design/part-block.txt: diff --git a/gst/gstbin.c b/gst/gstbin.c index fcbef9ad1d..f959a69977 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -3029,14 +3029,16 @@ bin_query_latency_fold (GstElement * item, GValue * ret, QueryFold * fold) /* for the combined latency we collect the MAX of all min latencies and * the MIN of all max latencies */ - if (min > fold->min) - fold->min = min; - if (fold->max == -1) - fold->max = max; - else if (max < fold->max) - fold->max = max; - if (fold->live == FALSE) - fold->live = live; + if (live) { + if (min > fold->min) + fold->min = min; + if (fold->max == -1) + fold->max = max; + else if (max < fold->max) + fold->max = max; + if (fold->live == FALSE) + fold->live = live; + } } else { g_value_set_boolean (ret, FALSE); GST_DEBUG_OBJECT (item, "failed query");