Commit 89f3aa8c authored by Ronald S. Bultje's avatar Ronald S. Bultje

adpcm: use av_clip() in adpcm_ima_expand_nibble().

parent 689be85a
......@@ -150,8 +150,7 @@ static inline short adpcm_ima_expand_nibble(ADPCMChannelStatus *c, char nibble,
step = ff_adpcm_step_table[c->step_index];
step_index = c->step_index + ff_adpcm_index_table[(unsigned)nibble];
if (step_index < 0) step_index = 0;
else if (step_index > 88) step_index = 88;
step_index = av_clip(step_index, 0, 88);
sign = nibble & 8;
delta = nibble & 7;
......
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