From 0e625b097bba198b788297b2cee7f712379371b7 Mon Sep 17 00:00:00 2001 From: Olivier Crete Date: Thu, 3 Apr 2008 16:54:15 +0000 Subject: [MOVED FROM GST-P-FARSIGHT] Do the min/max of the latencies correctly 20080403165415-3e2dc-c1124bd84e67cf8a911a14bb123b8731da9f4fc4.gz --- gst/liveadder/liveadder.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/gst/liveadder/liveadder.c b/gst/liveadder/liveadder.c index 453829c8..8546b565 100644 --- a/gst/liveadder/liveadder.c +++ b/gst/liveadder/liveadder.c @@ -608,7 +608,7 @@ gst_live_adder_query (GstPad * pad, GstQuery * query) { /* We need to send the query upstream and add the returned latency to our * own */ - GstClockTime min_latency = G_MAXUINT64, max_latency = 0; + GstClockTime min_latency = 0, max_latency = G_MAXUINT64; gpointer item; GstIterator *iter = NULL; gboolean done = FALSE; @@ -641,8 +641,8 @@ gst_live_adder_query (GstPad * pad, GstQuery * query) } break; case GST_ITERATOR_RESYNC: - min_latency = G_MAXUINT64; - max_latency = 0; + min_latency = 0; + max_latency = G_MAXUINT64; gst_iterator_resync (iter); break; @@ -658,11 +658,6 @@ gst_live_adder_query (GstPad * pad, GstQuery * query) gst_iterator_free (iter); if (res) { - if (min_latency == G_MAXUINT64) - min_latency = 0; - - if (max_latency < min_latency) - max_latency = min_latency; GST_OBJECT_LOCK (adder); adder->peer_latency = min_latency; -- cgit v1.2.1