diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-02-23 13:10:58 -0500 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-26 03:15:59 +0100 |
commit | 994e445a17303abcc87b487e4abea54e505fe618 (patch) | |
tree | 22b58030edd933d9c520b2c8913613bceb1ecf44 /libavcodec/vmdav.c | |
parent | dca85c842d9602162b7473baada524347efccd99 (diff) | |
download | ffmpeg-994e445a17303abcc87b487e4abea54e505fe618.tar.gz |
vmdaudio: fix raw_block_size calculation.
The size should depend on the output sample size, not the internal bit depth.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit a58bcb40b164b92957db73e702465808a9180126)
Diffstat (limited to 'libavcodec/vmdav.c')
-rw-r--r-- | libavcodec/vmdav.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c index e396c0bc9e..c7f99dbcb5 100644 --- a/libavcodec/vmdav.c +++ b/libavcodec/vmdav.c @@ -539,7 +539,8 @@ static int vmdaudio_decode_frame(AVCodecContext *avctx, } else if (buf[6] == 2) { /* initial chunk, may contain audio and silence */ uint32_t flags = AV_RB32(p); - int raw_block_size = s->block_align * s->bits / 8; + int raw_block_size = s->block_align * + (av_get_bits_per_sample_fmt(avctx->sample_fmt) / 8); int silent_chunks; if(flags == 0xFFFFFFFF) silent_chunks = 32; |