if (frame->format == AV_SAMPLE_FMT_S16P) {
int16_t *plane = (int16_t *)frame->extended_data[i];
for (k = 0; k < nsamples; k++)
- plane[k] = av_clip_int16(samples[k] * (1 << shift));
+ plane[k] = av_clip_int16(samples[k] * (SUINT)(1 << shift));
} else {
int32_t *plane = (int32_t *)frame->extended_data[i];
for (k = 0; k < nsamples; k++)
- plane[k] = clip23(samples[k] * (1 << shift)) * (1 << 8);
+ plane[k] = clip23(samples[k] * (SUINT)(1 << shift)) * (1 << 8);
}
}