Commit ef7fe985 authored by Andreas Cadhalpun's avatar Andreas Cadhalpun Committed by Rostislav Pehlivanov

aacps: avoid division by zero in stereo_processing

This fixes a SIGFPE crash in the aac_fixed decoder.
Signed-off-by: 's avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Reviewed-by: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
parent 6c2dbff7
......@@ -940,7 +940,7 @@ static void stereo_processing(PSContext *ps, INTFLOAT (*l)[32][2], INTFLOAT (*r)
LOCAL_ALIGNED_16(INTFLOAT, h_step, [2], [4]);
int start = ps->border_position[e];
int stop = ps->border_position[e+1];
INTFLOAT width = Q30(1.f) / (stop - start);
INTFLOAT width = Q30(1.f) / ((stop - start) ? (stop - start) : 1);
#if USE_FIXED
width <<= 1;
#endif
......
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