diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-10-07 07:58:03 +0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-10-08 00:45:50 +0400 |
commit | 5364327186fb90d67c860968a76bb0ec075308d4 (patch) | |
tree | e1c63149aaf2d9d921c640a4e5579bf6e3f59001 /libavcodec | |
parent | 62ae37decde7c15d4da95f1eb198789b8424d067 (diff) |
adpcmenc: ensure calls to adpcm_ima_compress_sample() are in the right order
Should fix fate-acodec-adpcm-ima_wav with several compilers.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/adpcmenc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c index 5c95ad7363..f81d7fde83 100644 --- a/libavcodec/adpcmenc.c +++ b/libavcodec/adpcmenc.c @@ -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; } } } |