[FFmpeg-cvslog] vocdec: Take channel count into account when calculating bit rate.

Reimar Döffinger git at videolan.org
Sat Aug 27 22:13:16 CEST 2011


ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Sat Aug 27 13:48:38 2011 +0200| [056c13fd170e0bc188c25a2ff61241f33c9d0ba1] | committer: Reimar Döffinger

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 at gmx.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=056c13fd170e0bc188c25a2ff61241f33c9d0ba1
---

 libavformat/vocdec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/vocdec.c b/libavformat/vocdec.c
index fd03c5b..fed7c6d 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;



More information about the ffmpeg-cvslog mailing list