diff --git a/spa/plugins/audioconvert/resample-native.c b/spa/plugins/audioconvert/resample-native.c index d87a4ab13..ad967d2f7 100644 --- a/spa/plugins/audioconvert/resample-native.c +++ b/spa/plugins/audioconvert/resample-native.c @@ -258,13 +258,13 @@ static void impl_native_process(struct resample *r, int skip = in - hist; /* we are past the history and can now work on the new * input data */ - in = *in_len - skip; + in = *in_len; data->func(r, src, skip, &in, dst, out, out_len); spa_log_trace_fp(r->log, "native %p: in:%d/%d out %d/%d", r, *in_len, in, *out_len, out); - remain = *in_len - in; + remain = *in_len - skip - in; if (remain > 0 && remain < n_taps) { /* not enough input data remaining for more output, * copy to history */