Mercurial > mplayer.hg
changeset 33236:889bde9a7c11
Improve seeking for files where start_time is not (properly) set.
author | reimar |
---|---|
date | Sun, 24 Apr 2011 21:32:36 +0000 |
parents | 6e6eac0ea1b4 |
children | a8619bfabf84 |
files | libmpdemux/demux_lavf.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c Sun Apr 24 16:13:25 2011 +0000 +++ b/libmpdemux/demux_lavf.c Sun Apr 24 21:32:36 2011 +0000 @@ -662,7 +662,8 @@ mp_msg(MSGT_DEMUX,MSGL_DBG2,"demux_seek_lavf(%p, %f, %f, %d)\n", demuxer, rel_seek_secs, audio_delay, flags); if (flags & SEEK_ABSOLUTE) { - priv->last_pts = priv->avfc->start_time; + priv->last_pts = priv->avfc->start_time != AV_NOPTS_VALUE ? + priv->avfc->start_time : 0; } else { if (rel_seek_secs < 0) avsflags = AVSEEK_FLAG_BACKWARD; }