[FFmpeg-devel] [PATCH] swr: move compensation_distance handling to swri_resample caller.

Ronald S. Bultje rsbultje at gmail.com
Tue May 27 15:16:37 CEST 2014


Hi,

Well that's embarassing this was clearly not tested yet:

On Tue, May 27, 2014 at 8:39 AM, Ronald S. Bultje <rsbultje at gmail.com>wrote:

> @@ -564,9 +573,18 @@ static int resample(SwrContext *s, AudioData
> *out_param, int out_count,
>          }
>
>          if((s->flushed || in_count > padless) && !s->in_buffer_count){
> +            int out_count_2 = out_count;
> +            if (s->resample->compensation_distance != 0)
> +                out_count_2 = FFMAX(out_count_2,
> s->resample->compensation_distance);
>

This should be FFMIN :-p.

Ronald


More information about the ffmpeg-devel mailing list