[MPlayer-cvslog] r19212 - trunk/libmpdemux/demux_lavf.c

reimar subversion at mplayerhq.hu
Fri Jul 28 15:39:11 CEST 2006


Author: reimar
Date: Fri Jul 28 15:39:11 2006
New Revision: 19212

Modified:
   trunk/libmpdemux/demux_lavf.c

Log:
Do not treat AV_NOPTS_VALUE as a valid duration value.


Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c	(original)
+++ trunk/libmpdemux/demux_lavf.c	Fri Jul 28 15:39:11 2006
@@ -394,14 +394,14 @@
     
     switch (cmd) {
         case DEMUXER_CTRL_GET_TIME_LENGTH:
-	    if (priv->avfc->duration == 0)
+	    if (priv->avfc->duration == 0 || priv->avfc->duration == AV_NOPTS_VALUE)
 	        return DEMUXER_CTRL_DONTKNOW;
 	    
 	    *((double *)arg) = (double)priv->avfc->duration / AV_TIME_BASE;
 	    return DEMUXER_CTRL_OK;
 
 	case DEMUXER_CTRL_GET_PERCENT_POS:
-	    if (priv->avfc->duration == 0)
+	    if (priv->avfc->duration == 0 || priv->avfc->duration == AV_NOPTS_VALUE)
 	        return DEMUXER_CTRL_DONTKNOW;
 	    
 	    *((int *)arg) = (int)((priv->last_pts - priv->avfc->start_time)*100 / priv->avfc->duration);



More information about the MPlayer-cvslog mailing list