mirror of
https://github.com/mpv-player/mpv
synced 2025-03-20 18:28:01 +00:00
demux: don't adjust internal backward playback seeks by start time
Only timestamps that enter or leave the demuxer API should be adjusted by ts_offset (which is usually the start time). queue_seek() is also used by backward demux seeks, which uses an internal timestamp.
This commit is contained in:
parent
5b4ae42328
commit
5ebbde7327
@ -3171,7 +3171,12 @@ int demux_seek(demuxer_t *demuxer, double seek_pts, int flags)
|
||||
assert(demuxer == in->d_user);
|
||||
|
||||
pthread_mutex_lock(&in->lock);
|
||||
|
||||
if (!(flags & SEEK_FACTOR))
|
||||
seek_pts = MP_ADD_PTS(seek_pts, -in->ts_offset);
|
||||
|
||||
int res = queue_seek(in, seek_pts, flags, true);
|
||||
|
||||
pthread_cond_signal(&in->wakeup);
|
||||
pthread_mutex_unlock(&in->lock);
|
||||
|
||||
@ -3187,9 +3192,6 @@ static bool queue_seek(struct demux_internal *in, double seek_pts, int flags,
|
||||
MP_VERBOSE(in, "queuing seek to %f%s\n", seek_pts,
|
||||
in->seeking ? " (cascade)" : "");
|
||||
|
||||
if (!(flags & SEEK_FACTOR))
|
||||
seek_pts = MP_ADD_PTS(seek_pts, -in->ts_offset);
|
||||
|
||||
bool require_cache = flags & SEEK_CACHED;
|
||||
flags &= ~(unsigned)SEEK_CACHED;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user