1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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

Should fix fate-acodec-adpcm-ima_wav with several compilers.
This commit is contained in:
Justin Ruggles 2012-10-06 23:58:03 -04:00
parent 62ae37decd
commit 5364327186

View File

@ -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;
}
}
}