Commit 8083332c authored by Justin Ruggles's avatar Justin Ruggles

asyncts: use clipped delta value when setting resample compensation

The max_comp option is supposed to limit maximum compensation, but
currently the clipped value is not actually used.
parent f266486b
......@@ -197,7 +197,7 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *buf)
if (s->resample) {
int comp = av_clip(delta, -s->max_comp, s->max_comp);
av_log(ctx, AV_LOG_VERBOSE, "Compensating %d samples per second.\n", comp);
avresample_set_compensation(s->avr, delta, inlink->sample_rate);
avresample_set_compensation(s->avr, comp, inlink->sample_rate);
delta = 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment