[MPlayer-cvslog] r35406 - trunk/libmpdemux/muxer_lavf.c

reimar subversion at mplayerhq.hu
Sat Nov 10 15:27:10 CET 2012


Author: reimar
Date: Sat Nov 10 15:27:09 2012
New Revision: 35406

Log:
Simplify code.

Modified:
   trunk/libmpdemux/muxer_lavf.c

Modified: trunk/libmpdemux/muxer_lavf.c
==============================================================================
--- trunk/libmpdemux/muxer_lavf.c	Sat Nov 10 15:21:16 2012	(r35405)
+++ trunk/libmpdemux/muxer_lavf.c	Sat Nov 10 15:27:09 2012	(r35406)
@@ -177,19 +177,17 @@ static muxer_stream_t* lavf_new_stream(m
 
 static void fix_parameters(muxer_stream_t *stream)
 {
-	muxer_stream_priv_t *spriv = (muxer_stream_priv_t *) stream->priv;
-	AVCodecContext *ctx;
-
-	ctx = spriv->avstream->codec;
+	muxer_stream_priv_t *spriv = stream->priv;
+	AVCodecContext *ctx = spriv->avstream->codec;
 
         ctx->bit_rate= stream->avg_rate;
-        if(stream->wf && stream->wf->nAvgBytesPerSec && !ctx->bit_rate)
-            ctx->bit_rate = stream->wf->nAvgBytesPerSec * 8;
         ctx->rc_buffer_size= stream->vbv_size;
         ctx->rc_max_rate= stream->max_rate;
 
 	if(stream->type == MUXER_TYPE_AUDIO)
 	{
+		if (!ctx->bit_rate)
+		    ctx->bit_rate = stream->wf->nAvgBytesPerSec * 8;
 		ctx->codec_id = mp_tag2codec_id(stream->wf->wFormatTag, 1);
 #if 0 //breaks aac in mov at least
 		ctx->codec_tag = codec_get_wav_tag(ctx->codec_id);


More information about the MPlayer-cvslog mailing list