[FFmpeg-devel] [PATCH 01/16] vmdaudio: fix raw_block_size calculation.
Kostya
kostya.shishkov
Tue Feb 22 22:40:32 CET 2011
On Tue, Feb 22, 2011 at 02:05:20PM -0500, Justin Ruggles wrote:
>
> The size should depend on the output sample size, not the internal bit depth.
> ---
> libavcodec/vmdav.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c
> index e396c0b..c7f99db 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;
looks ok
More information about the ffmpeg-devel
mailing list