changeset 17834:d378f2f39537

in fix_parameters() move assignment of audio bitrate to the proper block (the bitrate for video is actually hardcoded to 800000)
author nicodvb
date Sun, 12 Mar 2006 19:05:57 +0000
parents b3ee00937967
children b493e5ba8741
files libmpdemux/muxer_lavf.c
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/muxer_lavf.c	Sun Mar 12 18:58:08 2006 +0000
+++ b/libmpdemux/muxer_lavf.c	Sun Mar 12 19:05:57 2006 +0000
@@ -183,9 +183,6 @@
 #else
 	ctx = &(spriv->avstream->codec);
 #endif
-	
-        if(stream->wf && stream->wf->nAvgBytesPerSec)
-            ctx->bit_rate = stream->wf->nAvgBytesPerSec * 8;
         ctx->rc_buffer_size= stream->vbv_size;
         ctx->rc_max_rate= stream->max_rate;
 
@@ -198,6 +195,8 @@
 		ctx->codec_tag = codec_get_wav_tag(ctx->codec_id);
 #endif
 		mp_msg(MSGT_MUXER, MSGL_INFO, "AUDIO CODEC ID: %x, TAG: %x\n", ctx->codec_id, (uint32_t) ctx->codec_tag);
+		if(stream->wf->nAvgBytesPerSec)
+			ctx->bit_rate = stream->wf->nAvgBytesPerSec * 8;
 		ctx->sample_rate = stream->wf->nSamplesPerSec;
 //                mp_msg(MSGT_MUXER, MSGL_INFO, "stream->h.dwSampleSize: %d\n", stream->h.dwSampleSize);
 		ctx->channels = stream->wf->nChannels;