summaryrefslogtreecommitdiffstats
path: root/player/video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-01-26 14:06:41 +0100
committerwm4 <wm4@nowhere>2016-01-26 14:06:41 +0100
commit502763fcc76cf36f11ed6c73d944699270568235 (patch)
tree9a0751364d767a266aacdf2eb09f66eba17cc078 /player/video.c
parent475d346174bb8336226d6a618261b61ee0692f71 (diff)
downloadmpv-502763fcc76cf36f11ed6c73d944699270568235.tar.bz2
mpv-502763fcc76cf36f11ed6c73d944699270568235.tar.xz
video: slightly improve video stream switching
Resync newly switched video streams to the current playback position. (Normal seeks will reset playback_pts to NOPTS.)
Diffstat (limited to 'player/video.c')
-rw-r--r--player/video.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/player/video.c b/player/video.c
index 67bf1385aa..c247629ed3 100644
--- a/player/video.c
+++ b/player/video.c
@@ -726,6 +726,11 @@ static int video_output_image(struct MPContext *mpctx, double endpts)
/* just skip - but save if backstep active */
if (mpctx->hrseek_backstep)
mp_image_setrefp(&mpctx->saved_frame, img);
+ } else if (mpctx->video_status == STATUS_SYNCING &&
+ mpctx->playback_pts != MP_NOPTS_VALUE &&
+ img->pts < mpctx->playback_pts)
+ {
+ /* skip after stream-switching */
} else {
if (hrseek && mpctx->hrseek_backstep) {
if (mpctx->saved_frame) {