[MPlayer-cvslog] CVS: main/libmpdemux demux_avi.c,1.68,1.69
Reimar Döffinger CVS
syncmail at mplayerhq.hu
Sun Jan 8 14:35:56 CET 2006
CVS change done by Reimar Döffinger CVS
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv15587
Modified Files:
demux_avi.c
Log Message:
fix crash if no video codec available
Index: demux_avi.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_avi.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- demux_avi.c 30 Oct 2005 09:19:05 -0000 1.68
+++ demux_avi.c 8 Jan 2006 13:35:54 -0000 1.69
@@ -837,13 +837,13 @@
switch(cmd) {
case DEMUXER_CTRL_GET_TIME_LENGTH:
- if (!priv->numberofframes) return DEMUXER_CTRL_DONTKNOW;
+ if (!priv->numberofframes || !sh_video) return DEMUXER_CTRL_DONTKNOW;
*((double *)arg)=(double)priv->numberofframes/sh_video->fps;
if (sh_video->video.dwLength<=1) return DEMUXER_CTRL_GUESS;
return DEMUXER_CTRL_OK;
case DEMUXER_CTRL_GET_PERCENT_POS:
- if (!priv->numberofframes) {
+ if (!priv->numberofframes || !sh_video) {
return DEMUXER_CTRL_DONTKNOW;
}
*((int *)arg)=(int)(priv->video_pack_no*100/priv->numberofframes);
More information about the MPlayer-cvslog
mailing list