ffmpeg | branch: master | Michael Niedermayer <michae...@gmx.at> | Sat Mar 14 
01:15:37 2015 +0100| [e16592c42e877ab93a9a719ca69df22c2a487a98] | committer: 
Michael Niedermayer

swresample/resample: Fix undefined shifts

Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfo...@google.com>
Signed-off-by: Michael Niedermayer <michae...@gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e16592c42e877ab93a9a719ca69df22c2a487a98
---

 libswresample/resample.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libswresample/resample.c b/libswresample/resample.c
index d0f6e20..d4c7d06 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;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to