aacdec: fix signed overflows in lcg_random()
Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
parent
dd3b73f390
commit
edd80ec7e3
1 changed files with 2 additions and 1 deletions
|
|
@ -787,7 +787,8 @@ static int decode_audio_specific_config(AACContext *ac,
|
|||
*/
|
||||
static av_always_inline int lcg_random(int previous_val)
|
||||
{
|
||||
return previous_val * 1664525 + 1013904223;
|
||||
union { unsigned u; int s; } v = { previous_val * 1664525u + 1013904223 };
|
||||
return v.s;
|
||||
}
|
||||
|
||||
static av_always_inline void reset_predict_state(PredictorState *ps)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue