From e16592c42e877ab93a9a719ca69df22c2a487a98 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 14 Mar 2015 01:15:37 +0100 Subject: swresample/resample: Fix undefined shifts Found-by: Clang -fsanitize=shift Reported-by: Thierry Foucu Signed-off-by: Michael Niedermayer --- libswresample/resample.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libswresample/resample.c') 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; -- cgit v1.2.3