Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-14 03:15:37 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-03-14 03:15:37 +0300
commite16592c42e877ab93a9a719ca69df22c2a487a98 (patch)
treeccbc02522dbe24afbbd5e41ba75b1c13f01119ab /libswresample/resample.c
parentb14de8e6895cf1191e2c2f94e1c33db296a34342 (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>
Diffstat (limited to 'libswresample/resample.c')
-rw-r--r--libswresample/resample.c2
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;