changeset 17829:ff148faa7ed5

fixed C99-ism introduced with previous commit
author nicodvb
date Sun, 12 Mar 2006 18:06:46 +0000
parents d6fe562d4e49
children e640ecc0be46
files libmpdemux/muxer_lavf.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/muxer_lavf.c	Sun Mar 12 17:46:51 2006 +0000
+++ b/libmpdemux/muxer_lavf.c	Sun Mar 12 18:06:46 2006 +0000
@@ -103,17 +103,17 @@
 
 static muxer_stream_t* lavf_new_stream(muxer_t *muxer, int type)
 {
-	if(!muxer) return NULL;
-	muxer_priv_t *priv = (muxer_priv_t*) muxer->priv;
+	muxer_priv_t *priv;
 	muxer_stream_t *stream;
 	muxer_stream_priv_t *spriv;
 	AVCodecContext *ctx;
 
-	if(type != MUXER_TYPE_VIDEO && type != MUXER_TYPE_AUDIO) 
+	if(!muxer || (type != MUXER_TYPE_VIDEO && type != MUXER_TYPE_AUDIO))
 	{
-		mp_msg(MSGT_MUXER, MSGL_ERR, "UNKNOW TYPE %d\n", type);
+		mp_msg(MSGT_MUXER, MSGL_ERR, "NULL MUXER PASSED OR UNKNOW TYPE %d\n", type);
 		return NULL;
 	}
+	priv = (muxer_priv_t*) muxer->priv;
 	
 	stream = (muxer_stream_t*) calloc(1, sizeof(muxer_stream_t));
 	if(!stream)