diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-06-26 00:29:59 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-06-26 00:29:59 +0200 |
commit | b4302cacf94b0e720befc120ae9fe71be77a8973 (patch) | |
tree | e425141235d6c40c325aeb197487e534ad84b4af | |
parent | 63b68f418e2bf905ebb6068aaa4fd05467d8e1ba (diff) |
fix up monotonicity of input to _get() instead of hitting an assert
-rw-r--r-- | src/pulsecore/time-smoother.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pulsecore/time-smoother.c b/src/pulsecore/time-smoother.c index fe5a4f18..013edfc6 100644 --- a/src/pulsecore/time-smoother.c +++ b/src/pulsecore/time-smoother.c @@ -373,12 +373,15 @@ pa_usec_t pa_smoother_get(pa_smoother *s, pa_usec_t x) { x = PA_LIKELY(x >= s->time_offset) ? x - s->time_offset : 0; + if (s->monotonic) + if (x <= s->last_x) + x = s->last_x; + estimate(s, x, &y, NULL); if (s->monotonic) { /* Make sure the querier doesn't jump forth and back. */ - pa_assert(x >= s->last_x); s->last_x = x; if (y < s->last_y) |