[Mplayer-cvslog] CVS: main/libmpdemux demux_mpg.c,1.50,1.51

Reimar Döffinger CVS syncmail at mplayerhq.hu
Fri Oct 15 18:11:33 CEST 2004


CVS change done by Reimar Döffinger CVS

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

Modified Files:
	demux_mpg.c 
Log Message:
avoid segfault with -vc dummy


Index: demux_mpg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mpg.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- demux_mpg.c	7 Aug 2004 14:20:28 -0000	1.50
+++ demux_mpg.c	15 Oct 2004 16:11:30 -0000	1.51
@@ -417,7 +417,7 @@
 
     switch(cmd) {
 	case DEMUXER_CTRL_GET_TIME_LENGTH:
-	    if(!sh_video->i_bps)  // unspecified or VBR 
+	    if(!sh_video || !sh_video->i_bps)  // unspecified or VBR 
     		return DEMUXER_CTRL_DONTKNOW;
 	    *((unsigned long *)arg)=(demuxer->movi_end-demuxer->movi_start)/sh_video->i_bps;
 	    return DEMUXER_CTRL_GUESS;




More information about the MPlayer-cvslog mailing list