diff options
author | Paul B Mahol <onemda@gmail.com> | 2018-12-26 10:41:41 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2018-12-26 10:41:41 +0100 |
commit | 9ce96a744d6ffb1006712ac76d91d69032ebb82b (patch) | |
tree | b5d8e20603de7ecc36d0a3f867e640ecc64a5e73 /libavfilter/af_headphone.c | |
parent | 92ed9316bba13cb1b2cccb0db0389c1b92dd1032 (diff) | |
download | ffmpeg-streaming-9ce96a744d6ffb1006712ac76d91d69032ebb82b.zip ffmpeg-streaming-9ce96a744d6ffb1006712ac76d91d69032ebb82b.tar.gz |
avfilter/af_headphone: fix regression after 7c201e420
Diffstat (limited to 'libavfilter/af_headphone.c')
-rw-r--r-- | libavfilter/af_headphone.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/af_headphone.c b/libavfilter/af_headphone.c index dab897f..14cef0e 100644 --- a/libavfilter/af_headphone.c +++ b/libavfilter/af_headphone.c @@ -208,12 +208,12 @@ static int headphone_convolute(AVFilterContext *ctx, void *arg, int jobnr, int n continue; } - read = (wr - *(delay + l) - (air_len - 1) + buffer_length) & modulo; + read = (wr - *(delay + l) - (ir_len - 1) + buffer_length) & modulo; - if (read + air_len < buffer_length) { - memcpy(temp_src, bptr + read, air_len * sizeof(*temp_src)); + if (read + ir_len < buffer_length) { + memcpy(temp_src, bptr + read, ir_len * sizeof(*temp_src)); } else { - int len = FFMIN(air_len - (read % air_len), buffer_length - read); + int len = FFMIN(air_len - (read % ir_len), buffer_length - read); memcpy(temp_src, bptr + read, len * sizeof(*temp_src)); memcpy(temp_src + len, bptr, (air_len - len) * sizeof(*temp_src)); |