if (avctx->bits_per_coded_sample != 4) {
int samples_per_block = ff_adpcm_ima_block_samples[avctx->bits_per_coded_sample - 2];
int block_size = ff_adpcm_ima_block_sizes[avctx->bits_per_coded_sample - 2];
- uint8_t temp[20] = { 0 };
+ uint8_t temp[20 + AV_INPUT_BUFFER_PADDING_SIZE] = { 0 };
GetBitContext g;
for (n = 0; n < (nb_samples - 1) / samples_per_block; n++) {
case AV_CODEC_ID_ADPCM_MTAF:
for (channel = 0; channel < avctx->channels; channel+=2) {
bytestream2_skipu(&gb, 4);
- c->status[channel ].step = bytestream2_get_le16u(&gb);
- c->status[channel + 1].step = bytestream2_get_le16u(&gb);
+ c->status[channel ].step = bytestream2_get_le16u(&gb) & 0x1f;
+ c->status[channel + 1].step = bytestream2_get_le16u(&gb) & 0x1f;
c->status[channel ].predictor = sign_extend(bytestream2_get_le16u(&gb), 16);
bytestream2_skipu(&gb, 2);
c->status[channel + 1].predictor = sign_extend(bytestream2_get_le16u(&gb), 16);