[FFmpeg-cvslog] wmaenc: dont mess with the bitrate.

Michael Niedermayer git at videolan.org
Tue Aug 7 13:45:28 CEST 2012


ffmpeg | branch: release/0.11 | Michael Niedermayer <michaelni at gmx.at> | Mon Jul  2 12:47:08 2012 +0200| [a19010f7a6bc9e37b22e5b19d5eaba84d404b2f4] | committer: Michael Niedermayer

wmaenc: dont mess with the bitrate.

The bitrate is not writeable by an encoder.
Fixes generation of invalid wma

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/wmaenc.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c
index 71446e1..dab7103 100644
--- a/libavcodec/wmaenc.c
+++ b/libavcodec/wmaenc.c
@@ -85,8 +85,6 @@ static int encode_init(AVCodecContext * avctx){
                          (avctx->sample_rate * 8);
     s->block_align     = FFMIN(s->block_align, MAX_CODED_SUPERFRAME_SIZE);
     avctx->block_align = s->block_align;
-    avctx->bit_rate    = avctx->block_align * 8LL * avctx->sample_rate /
-                         s->frame_len;
 //av_log(NULL, AV_LOG_ERROR, "%d %d %d %d\n", s->block_align, avctx->bit_rate, s->frame_len, avctx->sample_rate);
     avctx->frame_size = avctx->delay = s->frame_len;
 



More information about the ffmpeg-cvslog mailing list