mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
fix up monotonicity of input to _get() instead of hitting an assert
This commit is contained in:
parent
63b68f418e
commit
b4302cacf9
1 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
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);
|
estimate(s, x, &y, NULL);
|
||||||
|
|
||||||
if (s->monotonic) {
|
if (s->monotonic) {
|
||||||
|
|
||||||
/* Make sure the querier doesn't jump forth and back. */
|
/* Make sure the querier doesn't jump forth and back. */
|
||||||
pa_assert(x >= s->last_x);
|
|
||||||
s->last_x = x;
|
s->last_x = x;
|
||||||
|
|
||||||
if (y < s->last_y)
|
if (y < s->last_y)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue