mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
[MOVED FROM GST-P-FARSIGHT] Do the min/max of the latencies correctly
20080403165415-3e2dc-c1124bd84e67cf8a911a14bb123b8731da9f4fc4.gz
This commit is contained in:
parent
a5e2d805e6
commit
0e625b097b
1 changed files with 3 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue