Mercurial > mplayer.hg
changeset 19207:c636a4e9565a
Do not treat AV_NOPTS_VALUE as a valid duration value.
author | reimar |
---|---|
date | Fri, 28 Jul 2006 13:39:11 +0000 |
parents | c629606a0702 |
children | 99d6ca895c46 |
files | libmpdemux/demux_lavf.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c Fri Jul 28 09:07:09 2006 +0000 +++ b/libmpdemux/demux_lavf.c Fri Jul 28 13:39:11 2006 +0000 @@ -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);