[MPlayer-cvslog] r25870 - trunk/libmpdemux/demux_lavf.c
reimar
subversion at mplayerhq.hu
Sat Jan 26 23:06:36 CET 2008
Author: reimar
Date: Sat Jan 26 23:06:36 2008
New Revision: 25870
Log:
Used wrong condition for using AVSEEK_FLAG_BACKWARD, it should depend on
relative vs. absolute, not time- vs. percent-based seek.
Modified:
trunk/libmpdemux/demux_lavf.c
Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c (original)
+++ trunk/libmpdemux/demux_lavf.c Sat Jan 26 23:06:36 2008
@@ -611,15 +611,16 @@ static void demux_seek_lavf(demuxer_t *d
int avsflags = 0;
mp_msg(MSGT_DEMUX,MSGL_DBG2,"demux_seek_lavf(%p, %f, %f, %d)\n", demuxer, rel_seek_secs, audio_delay, flags);
- if (flags & 1) // absolute seek
+ if (flags & 1) { // absolute seek
priv->last_pts = priv->avfc->start_time;
+ if (rel_seek_secs < 0) avsflags = AVSEEK_FLAG_BACKWARD;
+ }
if (flags & 2) { // percent seek
if (priv->avfc->duration == 0 || priv->avfc->duration == AV_NOPTS_VALUE)
return;
priv->last_pts += rel_seek_secs * priv->avfc->duration;
} else {
priv->last_pts += rel_seek_secs * AV_TIME_BASE;
- if (rel_seek_secs < 0) avsflags = AVSEEK_FLAG_BACKWARD;
}
av_seek_frame(priv->avfc, -1, priv->last_pts, avsflags);
}
More information about the MPlayer-cvslog
mailing list