mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-30 11:24:17 +00:00
avfilter/af_headphone: Remove pointless additions
buffer_length is a power-of-two and modulo is buffer_length - 1, so that buffer_length & modulo is zero. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
8dda0d601b
commit
7b841cf6b7
@ -178,7 +178,7 @@ static int headphone_convolute(AVFilterContext *ctx, void *arg, int jobnr, int n
|
||||
continue;
|
||||
}
|
||||
|
||||
read = (wr - (ir_len - 1) + buffer_length) & modulo;
|
||||
read = (wr - (ir_len - 1)) & modulo;
|
||||
|
||||
if (read + ir_len < buffer_length) {
|
||||
memcpy(temp_src, bptr + read, ir_len * sizeof(*temp_src));
|
||||
|
Loading…
Reference in New Issue
Block a user