[MPlayer-cvslog] CVS: main/libmpdemux muxer_lavf.c,1.27,1.28
Nico Sabbi CVS
syncmail at mplayerhq.hu
Mon Mar 13 08:08:05 CET 2006
CVS change done by Nico Sabbi CVS
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv9319
Modified Files:
muxer_lavf.c
Log Message:
recommitted version 1.22 + Rich's 1.25
Index: muxer_lavf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/muxer_lavf.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- muxer_lavf.c 12 Mar 2006 19:05:57 -0000 1.27
+++ muxer_lavf.c 13 Mar 2006 07:08:01 -0000 1.28
@@ -103,17 +103,16 @@
static muxer_stream_t* lavf_new_stream(muxer_t *muxer, int type)
{
- muxer_priv_t *priv;
+ muxer_priv_t *priv = muxer->priv;
muxer_stream_t *stream;
muxer_stream_priv_t *spriv;
AVCodecContext *ctx;
if(!muxer || (type != MUXER_TYPE_VIDEO && type != MUXER_TYPE_AUDIO))
{
- mp_msg(MSGT_MUXER, MSGL_ERR, "NULL MUXER PASSED OR UNKNOW TYPE %d\n", type);
+ mp_msg(MSGT_MUXER, MSGL_ERR, "UNKNOW TYPE %d\n", type);
return NULL;
}
- priv = muxer->priv;
stream = calloc(1, sizeof(muxer_stream_t));
if(!stream)
@@ -183,20 +182,19 @@
#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;
if(stream->type == MUXER_TYPE_AUDIO)
{
- if(!stream->wf)
- return;
ctx->codec_id = codec_get_wav_id(stream->wf->wFormatTag);
#if 0 //breaks aac in mov at least
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;
@@ -221,8 +219,6 @@
}
else if(stream->type == MUXER_TYPE_VIDEO)
{
- if(!stream->bih)
- return;
ctx->codec_id = codec_get_bmp_id(stream->bih->biCompression);
if(ctx->codec_id <= 0)
ctx->codec_tag= stream->bih->biCompression;
More information about the MPlayer-cvslog
mailing list