summaryrefslogtreecommitdiffstats
path: root/player/playloop.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-07 21:50:16 +0200
committerwm4 <wm4@nowhere>2014-05-07 21:50:16 +0200
commitf3362e22ebd8a39419c8225c3254fbbebe57d6e9 (patch)
treed520b97bc5b948b060417b2f7a4bdf8d4b8824cb /player/playloop.c
parentbd2bcc4399a86420523a1c0bdf3d3e2a9d683513 (diff)
downloadmpv-f3362e22ebd8a39419c8225c3254fbbebe57d6e9.tar.bz2
mpv-f3362e22ebd8a39419c8225c3254fbbebe57d6e9.tar.xz
player: remove VO from seeking code path
Until recently, the VO was an unavoidable part of the seeking code path. This was because vdpau deinterlacing could double the framerate, and hr- seek and framestepping etc. all had to "see" the additional frames. But we've removed the frame doubling from the vdpau VO and moved it into a video filter (vf_vdpaupp), and there's no reason left why the VO should participate in seeking. Instead of queuing frames to the VO during seek and skipping them afterwards, drop the frames early. This actually might make seeking with vo_vdpau and software decoding faster, although I haven't measured it.
Diffstat (limited to 'player/playloop.c')
-rw-r--r--player/playloop.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/player/playloop.c b/player/playloop.c
index 56ad70c484..e7637b07f5 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -736,6 +736,8 @@ void add_frame_pts(struct MPContext *mpctx, double pts)
mpctx->vo_pts_history_seek_ts++; // mark discontinuity
return;
}
+ if (mpctx->vo_pts_history_pts[0] == pts) // may be called multiple times
+ return;
for (int n = MAX_NUM_VO_PTS - 1; n >= 1; n--) {
mpctx->vo_pts_history_seek[n] = mpctx->vo_pts_history_seek[n - 1];
mpctx->vo_pts_history_pts[n] = mpctx->vo_pts_history_pts[n - 1];
@@ -1021,9 +1023,6 @@ void run_playloop(struct MPContext *mpctx)
video_left = r > 0;
- if (mpctx->video_next_pts != MP_NOPTS_VALUE && endpts != MP_NOPTS_VALUE)
- video_left &= mpctx->video_next_pts < endpts;
-
if (r == 2)
MP_VERBOSE(mpctx, "frametime=%5.3f\n", frame_time);