Browse Source

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 a58bcb40b1)
tags/n0.8
Justin Ruggles Michael Niedermayer 15 years ago
parent
commit
994e445a17
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/vmdav.c

+ 2
- 1
libavcodec/vmdav.c View File

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


Loading…
Cancel
Save