projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4acc94e
)
vmdaudio: fix raw_block_size calculation.
author
Justin Ruggles
<justin.ruggles@gmail.com>
Wed, 23 Feb 2011 18:10:58 +0000
(13:10 -0500)
committer
Ronald S. Bultje
<rsbultje@gmail.com>
Thu, 24 Feb 2011 01:58:56 +0000
(20:58 -0500)
The size should depend on the output sample size, not the internal bit depth.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
libavcodec/vmdav.c
patch
|
blob
|
history
diff --git
a/libavcodec/vmdav.c
b/libavcodec/vmdav.c
index
e396c0b
..
c7f99db
100644
(file)
--- 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;