summaryrefslogtreecommitdiff
path: root/libavformat/vocdec.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2011-08-27 13:48:38 +0200
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2011-08-27 22:12:51 +0200
commit056c13fd170e0bc188c25a2ff61241f33c9d0ba1 (patch)
treefeff9843b910a6e43fe30d37f453eebde74ba533 /libavformat/vocdec.c
parent2cd7a9ebe0e177b1f318ed4b0fa4240801fc9383 (diff)
downloadffmpeg-056c13fd170e0bc188c25a2ff61241f33c9d0ba1.tar.gz
vocdec: Take channel count into account when calculating bit rate.
Fixes trac issue #343. Carl Eugen Hoyos actually made a patch first, but I missed it because trac does not send notification emails when an attachment is added. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavformat/vocdec.c')
-rw-r--r--libavformat/vocdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/vocdec.c b/libavformat/vocdec.c
index fd03c5bec3..fed7c6d6e3 100644
--- a/libavformat/vocdec.c
+++ b/libavformat/vocdec.c
@@ -142,7 +142,7 @@ voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
}
}
- dec->bit_rate = dec->sample_rate * dec->bits_per_coded_sample;
+ dec->bit_rate = dec->sample_rate * dec->channels * dec->bits_per_coded_sample;
if (max_size <= 0)
max_size = 2048;