Commit 32f53958 authored by Michael Niedermayer's avatar Michael Niedermayer

swresample/swresample: Fix integer overflow in seed calculation

Fixes CID1322333
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 053e80f6
...@@ -650,7 +650,7 @@ static int swr_convert_internal(struct SwrContext *s, AudioData *out, int out_co ...@@ -650,7 +650,7 @@ static int swr_convert_internal(struct SwrContext *s, AudioData *out, int out_co
return ret; return ret;
if(ret) if(ret)
for(ch=0; ch<s->dither.noise.ch_count; ch++) for(ch=0; ch<s->dither.noise.ch_count; ch++)
if((ret=swri_get_dither(s, s->dither.noise.ch[ch], s->dither.noise.count, 12345678913579<<ch, s->dither.noise.fmt))<0) if((ret=swri_get_dither(s, s->dither.noise.ch[ch], s->dither.noise.count, (12345678913579ULL*ch + 3141592) % 2718281828U, s->dither.noise.fmt))<0)
return ret; return ret;
av_assert0(s->dither.noise.ch_count == preout->ch_count); av_assert0(s->dither.noise.ch_count == preout->ch_count);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment