Message ID | 20200908211856.16290-24-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Commit | 7b841cf6b706055164d5db3f2b901ed32e8092af |
Headers | show |
Series | [FFmpeg-devel,01/25] avfilter/af_headphone: Don't use uninitialized buffer in log message | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
On Tue, Sep 08, 2020 at 11:18:55PM +0200, Andreas Rheinhardt wrote: > buffer_length is a power-of-two and modulo is buffer_length - 1, so that > buffer_length & modulo is zero. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> > --- > libavfilter/af_headphone.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) fine
diff --git a/libavfilter/af_headphone.c b/libavfilter/af_headphone.c index 8db546adbf..03ef88c4a4 100644 --- a/libavfilter/af_headphone.c +++ b/libavfilter/af_headphone.c @@ -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));
buffer_length is a power-of-two and modulo is buffer_length - 1, so that buffer_length & modulo is zero. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavfilter/af_headphone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)