提交 53643271 编写于 作者: J Justin Ruggles

adpcmenc: ensure calls to adpcm_ima_compress_sample() are in the right order

Should fix fate-acodec-adpcm-ima_wav with several compilers.
上级 62ae37de
......@@ -537,8 +537,9 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
ADPCMChannelStatus *status = &c->status[ch];
const int16_t *smp = &samples_p[ch][1 + i * 8];
for (j = 0; j < 8; j += 2) {
*dst++ = adpcm_ima_compress_sample(status, smp[j ]) |
(adpcm_ima_compress_sample(status, smp[j + 1]) << 4);
uint8_t v = adpcm_ima_compress_sample(status, smp[j ]);
v |= adpcm_ima_compress_sample(status, smp[j + 1]) << 4;
*dst++ = v;
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册