[MPlayer-cvslog] CVS: main/libmpdemux muxer_lavf.c,1.22,1.23

Nico Sabbi CVS syncmail at mplayerhq.hu
Sun Mar 12 18:46:54 CET 2006


CVS change done by Nico Sabbi CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv19927

Modified Files:
	muxer_lavf.c 
Log Message:
check muxer != NULL before using it; closes cid 201

Index: muxer_lavf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/muxer_lavf.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- muxer_lavf.c	26 Jan 2006 19:32:07 -0000	1.22
+++ muxer_lavf.c	12 Mar 2006 17:46:51 -0000	1.23
@@ -103,12 +103,13 @@
 
 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_stream_t *stream;
 	muxer_stream_priv_t *spriv;
 	AVCodecContext *ctx;
 
-	if(!muxer || (type != MUXER_TYPE_VIDEO && type != MUXER_TYPE_AUDIO)) 
+	if(type != MUXER_TYPE_VIDEO && type != MUXER_TYPE_AUDIO) 
 	{
 		mp_msg(MSGT_MUXER, MSGL_ERR, "UNKNOW TYPE %d\n", type);
 		return NULL;




More information about the MPlayer-cvslog mailing list