diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-02-11 14:16:21 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-02-11 14:16:21 +0100 |
commit | 037928dcf675b1c6b360258878ae0e060621c03e (patch) | |
tree | 1c1aa293633c6ef940b2cddd6ddb180fb848f120 /gst/videomeasure | |
parent | 629b3508061afe3bc89e09a4b89e3a24d5c38a49 (diff) | |
download | gstreamer-plugins-bad-037928dcf675b1c6b360258878ae0e060621c03e.tar.gz |
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/videomeasure')
-rw-r--r-- | gst/videomeasure/gstvideomeasure_ssim.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gst/videomeasure/gstvideomeasure_ssim.c b/gst/videomeasure/gstvideomeasure_ssim.c index 3c7c502bf..81bd4951d 100644 --- a/gst/videomeasure/gstvideomeasure_ssim.c +++ b/gst/videomeasure/gstvideomeasure_ssim.c @@ -664,15 +664,17 @@ gst_ssim_query_latency (GstSSim * ssim, 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); |