summaryrefslogtreecommitdiff
path: root/gst/frei0r
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2015-02-11 14:16:21 +0100
committerSebastian Dröge <sebastian@centricular.com>2015-02-11 14:16:21 +0100
commit037928dcf675b1c6b360258878ae0e060621c03e (patch)
tree1c1aa293633c6ef940b2cddd6ddb180fb848f120 /gst/frei0r
parent629b3508061afe3bc89e09a4b89e3a24d5c38a49 (diff)
Improve and fix LATENCY query handling
This now follows the design docs everywhere, especially the maximum latency handling. https://bugzilla.gnome.org/show_bug.cgi?id=744106
Diffstat (limited to 'gst/frei0r')
-rw-r--r--gst/frei0r/gstfrei0rmixer.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/gst/frei0r/gstfrei0rmixer.c b/gst/frei0r/gstfrei0rmixer.c
index a54d3cfba..8d5f59b19 100644
--- a/gst/frei0r/gstfrei0rmixer.c
+++ b/gst/frei0r/gstfrei0rmixer.c
@@ -340,15 +340,17 @@ gst_frei0r_mixer_src_query_latency (GstFrei0rMixer * self, GstQuery * query)
if (res) {
gst_query_parse_latency (peerquery, &live_cur, &min_cur, &max_cur);
- if (min_cur > min)
- min = min_cur;
+ if (live_cur) {
+ if (min_cur > min)
+ min = min_cur;
- if (max_cur != GST_CLOCK_TIME_NONE &&
- ((max != GST_CLOCK_TIME_NONE && max_cur > max) ||
- (max == GST_CLOCK_TIME_NONE)))
- max = max_cur;
+ if (max == GST_CLOCK_TIME_NONE)
+ max = max_cur;
+ else if (max_cur < max)
+ max = max_cur;
- live = live || live_cur;
+ live = TRUE;
+ }
}
gst_query_unref (peerquery);