summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-11-23 16:20:44 +0100
committerwm4 <wm4@nowhere>2015-11-23 16:20:44 +0100
commitb2e8d5749be8825b011458d132873ff2be5b68ae (patch)
tree5e200fd64bd7c1f84ba11f6c114bb87924baa042 /demux
parent52af1f72e2c77e865001852cc1043d8037b8ba7a (diff)
downloadmpv-b2e8d5749be8825b011458d132873ff2be5b68ae.tar.bz2
mpv-b2e8d5749be8825b011458d132873ff2be5b68ae.tar.xz
demux: fix seeking in .ts
.ts files (and some other raw streams) are the only files that enable the SEEK_FACTOR code path, which was broken since commit 70df1608.
Diffstat (limited to 'demux')
-rw-r--r--demux/demux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/demux.c b/demux/demux.c
index a3d1ecf7c2..20cf30ac57 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -1163,7 +1163,7 @@ int demux_seek(demuxer_t *demuxer, double rel_seek_secs, int flags)
in->seeking = true;
in->seek_flags = flags;
in->seek_pts = rel_seek_secs;
- if (flags & SEEK_ABSOLUTE)
+ if ((flags & SEEK_ABSOLUTE) && !(flags & SEEK_FACTOR))
in->seek_pts = MP_ADD_PTS(in->seek_pts, -in->ts_offset);
if (!in->threading)