diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-14 03:15:37 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-14 03:15:37 +0300 |
commit | e16592c42e877ab93a9a719ca69df22c2a487a98 (patch) | |
tree | ccbc02522dbe24afbbd5e41ba75b1c13f01119ab | |
parent | b14de8e6895cf1191e2c2f94e1c33db296a34342 (diff) |
swresample/resample: Fix undefined shifts
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libswresample/resample.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libswresample/resample.c b/libswresample/resample.c index d0f6e20788..d4c7d06794 100644 --- a/libswresample/resample.c +++ b/libswresample/resample.c @@ -338,7 +338,7 @@ static int multiple_resample(ResampleContext *c, AudioData *dst, int dst_size, A static int64_t get_delay(struct SwrContext *s, int64_t base){ ResampleContext *c = s->resample; int64_t num = s->in_buffer_count - (c->filter_length-1)/2; - num <<= c->phase_shift; + num *= 1 << c->phase_shift; num -= c->index; num *= c->src_incr; num -= c->frac; |