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>
This commit is contained in:
Michael Niedermayer 2015-03-14 01:15:37 +01:00
parent b14de8e689
commit e16592c42e
1 changed files with 1 additions and 1 deletions

View File

@ -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;