[FFmpeg-devel] [PATCH 14/25] avfilter/af_headphone: Avoid intermediate buffers I

Paul B Mahol onemda at gmail.com
Wed Sep 9 04:21:05 EEST 2020


On Tue, Sep 08, 2020 at 11:18:45PM +0200, Andreas Rheinhardt wrote:
> 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.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
>  libavfilter/af_headphone.c | 38 +++++++++++++++-----------------------
>  1 file changed, 15 insertions(+), 23 deletions(-)
> 

should be fine if does not break usage.


More information about the ffmpeg-devel mailing list