diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2012-03-18 13:36:32 -0700 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2012-03-18 15:25:25 -0700 |
commit | c346f6304c35e9dfffacc6c71a2b3dfd8913d90b (patch) | |
tree | f69735692e2f52ea17874ac8c44d1e5410a75979 /libavcodec/adpcm.c | |
parent | 72ec043af4510723c53c729a67be482a14b7c7f3 (diff) | |
download | ffmpeg-c346f6304c35e9dfffacc6c71a2b3dfd8913d90b.tar.gz |
adpcm: fix nb_samples rounding for adpcm_ima_dk3, and update reference.
Diffstat (limited to 'libavcodec/adpcm.c')
-rw-r--r-- | libavcodec/adpcm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index 54c3e6d194..3610a58812 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -448,7 +448,7 @@ static int get_nb_samples(AVCodecContext *avctx, const uint8_t *buf, case CODEC_ID_ADPCM_IMA_DK3: if (avctx->block_align > 0) buf_size = FFMIN(buf_size, avctx->block_align); - nb_samples = ((buf_size - 16) * 8 / 3) / ch; + nb_samples = ((buf_size - 16) * 2 / 3 * 4) / ch; break; case CODEC_ID_ADPCM_IMA_DK4: nb_samples = 1 + (buf_size - 4 * ch) * 2 / ch; |