# HG changeset patch # User reimar # Date 1303680756 0 # Node ID 889bde9a7c1118e5b2da6db66c6bc45252ad738a # Parent 6e6eac0ea1b4edf653fb833522229bd378eb4c16 Improve seeking for files where start_time is not (properly) set. diff -r 6e6eac0ea1b4 -r 889bde9a7c11 libmpdemux/demux_lavf.c --- 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; }