[FFmpeg-devel] [PATCH] dynaudnorm: Increment input outside of the FFMIN macro so it doesn't get double incremented.

Paul B Mahol onemda at gmail.com
Wed Aug 9 11:23:14 EEST 2017

On 8/9/17, andyndeanna <andyndeanna at gmail.com> wrote:
> Greetings,
> Please find attached a patch for the dynaudnorm filter.  Under certain
> conditions, the output to the filter will clip at the beginning.  This can
> be demonstrated with the following:
> ffmpeg -filter_complex "aevalsrc=0:s=48000:d=0.6
> [a_in0];aevalsrc=0.1*sin(440*2*PI*t)*cos(0.5*2*PI*t):s=48000:d=20
> [a_in1];[a_in0] [a_in1] concat=n=2:v=0:a=1 [a_in];[a_in]
> dynaudnorm=b=1:m=100.0 [a_out]" -map "[a_out]" test.wav
> The root cause is that the FFMIN macro evaluates the minimum argument
> twice, resulting in the variable "input" getting incremented twice.

applied, thanks

More information about the ffmpeg-devel mailing list