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

andyndeanna andyndeanna at gmail.com
Wed Aug 9 04:36:50 EEST 2017


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.

Thanks,
Andy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Increment-input-outside-of-the-FFMIN-macro-so-it-doe.patch
Type: application/octet-stream
Size: 1110 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170808/a68a1476/attachment.obj>


More information about the ffmpeg-devel mailing list