]> git.sesse.net Git - ffmpeg/commit
avfilter/af_headphone: Avoid intermediate buffers I
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 25 Aug 2020 13:31:04 +0000 (15:31 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 9 Sep 2020 11:47:14 +0000 (13:47 +0200)
commitf5e1d38b87fb82c199ea293863789c8bfb7fe1bf
tree9b48bbbe0a74d8cf0f9b4bb41e24309bd5bbb96e
parenta513b306b3bb058f0501a72dd5169dfc39bf73ef
avfilter/af_headphone: Avoid intermediate buffers I

The headphone filter has two modes; in one of them (say A), it needs
certain buffers to store data. But it allocated them in both modes.
Furthermore when in mode A it also allocated intermediate buffers of the
same size, initialized them, copied their contents into the permanent
buffers and freed them.

This commit changes this: The permanent buffer is only allocated when
needed; the temporary buffer has been completely avoided.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavfilter/af_headphone.c