summaryrefslogtreecommitdiffstats
path: root/polyp/resampler.c
diff options
context:
space:
mode:
Diffstat (limited to 'polyp/resampler.c')
-rw-r--r--polyp/resampler.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/polyp/resampler.c b/polyp/resampler.c
index 377aa797..68c0129a 100644
--- a/polyp/resampler.c
+++ b/polyp/resampler.c
@@ -342,8 +342,8 @@ static void trivial_run(struct pa_resampler *r, const struct pa_memchunk *in, st
unsigned j;
j = (i->o_counter * r->i_ss.rate / r->o_ss.rate);
- assert(j >= i->i_counter);
- j = j - i->i_counter;
+
+ j = j > i->i_counter ? j - i->i_counter : 0;
if (j >= nframes)
break;