Browse Source

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>
tags/n2.7
Michael Niedermayer 11 years ago
parent
commit
e16592c42e
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libswresample/resample.c

+ 1
- 1
libswresample/resample.c 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;


Loading…
Cancel
Save