summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorOlivier Crete <olivier.crete@collabora.co.uk>2008-04-03 16:54:15 +0000
committerEdward Hervey <bilboed@bilboed.com>2009-02-17 19:29:03 +0100
commit0e625b097bba198b788297b2cee7f712379371b7 (patch)
tree3cf0f2272988b9ace5c987c096cbc94185e296d3 /gst
parenta5e2d805e6852b9ffe18a4bafdf5c4d35bb9d757 (diff)
downloadgst-plugins-bad-0e625b097bba198b788297b2cee7f712379371b7.tar.gz
gst-plugins-bad-0e625b097bba198b788297b2cee7f712379371b7.tar.bz2
gst-plugins-bad-0e625b097bba198b788297b2cee7f712379371b7.zip
[MOVED FROM GST-P-FARSIGHT] Do the min/max of the latencies correctly
20080403165415-3e2dc-c1124bd84e67cf8a911a14bb123b8731da9f4fc4.gz
Diffstat (limited to 'gst')
-rw-r--r--gst/liveadder/liveadder.c11
1 files 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;