wmaenc: dont mess with the bitrate.
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 2 Jul 2012 10:47:08 +0000 (12:47 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 2 Jul 2012 11:29:41 +0000 (13:29 +0200)
The bitrate is not writeable by an encoder.
Fixes generation of invalid wma

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/wmaenc.c

index 71446e1..dab7103 100644 (file)
@@ -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;