summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-08 00:30:01 +0200
committerwm4 <wm4@nowhere>2014-07-08 22:20:39 +0200
commit93f63214e09e081d55ea77f2460c4c2424059675 (patch)
tree62caa0037cbad8712399cc3789e3c269a0dcc01d
parent609187082fa531c1d8fad6a1bed71506873ebff9 (diff)
downloadmpv-93f63214e09e081d55ea77f2460c4c2424059675.tar.bz2
mpv-93f63214e09e081d55ea77f2460c4c2424059675.tar.xz
demux: remove accurate_seek field
It's unused now. (Only the dvd code used it until recently.)
-rw-r--r--demux/demux.c1
-rw-r--r--demux/demux.h3
-rw-r--r--player/playloop.c8
3 files changed, 3 insertions, 9 deletions
diff --git a/demux/demux.c b/demux/demux.c
index b04adbaabb..e716194614 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -453,7 +453,6 @@ static struct demuxer *open_given_type(struct mpv_global *global,
.type = desc->type,
.stream = stream,
.seekable = stream->seekable,
- .accurate_seek = true,
.filepos = -1,
.opts = global->opts,
.global = global,
diff --git a/demux/demux.h b/demux/demux.h
index 133e9ddd7a..58da35c796 100644
--- a/demux/demux.h
+++ b/demux/demux.h
@@ -177,9 +177,6 @@ typedef struct demuxer {
enum demuxer_type type;
int seekable; // flag
double start_time;
- /* Set if using absolute seeks for small movements is OK (no pts resets
- * that would make pts ambigious, preferably supports back/forward flags */
- bool accurate_seek;
// File format allows PTS resets (even if the current file is without)
bool ts_resets_possible;
bool warned_queue_overflow;
diff --git a/player/playloop.c b/player/playloop.c
index b3b3687c22..56b236d932 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -213,7 +213,7 @@ static int mp_seek(MPContext *mpctx, struct seek_params seek,
if (hr_seek_very_exact)
hr_seek_offset = MPMAX(hr_seek_offset, 0.5); // arbitrary
- bool hr_seek = mpctx->demuxer->accurate_seek && opts->correct_pts;
+ bool hr_seek = opts->correct_pts;
hr_seek &= seek.exact >= 0 && seek.type != MPSEEK_FACTOR;
hr_seek &= (opts->hr_seek == 0 && seek.type == MPSEEK_ABSOLUTE) ||
opts->hr_seek > 0 || seek.exact > 0;
@@ -227,8 +227,7 @@ static int mp_seek(MPContext *mpctx, struct seek_params seek,
seek.type = MPSEEK_ABSOLUTE;
}
}
- if ((mpctx->demuxer->accurate_seek || mpctx->timeline)
- && seek.type == MPSEEK_RELATIVE) {
+ if (seek.type == MPSEEK_RELATIVE) {
seek.type = MPSEEK_ABSOLUTE;
seek.direction = seek.amount > 0 ? 1 : -1;
seek.amount += get_current_time(mpctx);
@@ -761,8 +760,7 @@ static void handle_backstep(struct MPContext *mpctx)
double current_pts = mpctx->last_vo_pts;
mpctx->backstep_active = false;
- bool demuxer_ok = mpctx->demuxer && mpctx->demuxer->accurate_seek;
- if (demuxer_ok && mpctx->d_video && current_pts != MP_NOPTS_VALUE) {
+ if (mpctx->d_video && current_pts != MP_NOPTS_VALUE) {
double seek_pts = find_previous_pts(mpctx, current_pts);
if (seek_pts != MP_NOPTS_VALUE) {
queue_seek(mpctx, MPSEEK_ABSOLUTE, seek_pts, 2, true);