[FFmpeg-cvslog] adpcmenc: ensure calls to adpcm_ima_compress_sample() are in the right order
Justin Ruggles
git at videolan.org
Sun Oct 7 22:30:20 CEST 2012
ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Sun Oct 7 16:02:20 2012 -0400| [d58b25aaa261040cec29bffa571c41bc9f652f10] | committer: Michael Niedermayer
adpcmenc: ensure calls to adpcm_ima_compress_sample() are in the right order
Should fix fate-acodec-adpcm-ima_wav with several compilers.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d58b25aaa261040cec29bffa571c41bc9f652f10
---
libavcodec/adpcmenc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index f016ebd..747b9fe 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -538,8 +538,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;
}
}
}
More information about the ffmpeg-cvslog
mailing list