1
mirror of https://github.com/mpv-player/mpv synced 2024-07-31 16:29:58 +02:00

video: slightly improve video stream switching

Resync newly switched video streams to the current playback position.
(Normal seeks will reset playback_pts to NOPTS.)
This commit is contained in:
wm4 2016-01-26 14:06:41 +01:00
parent 475d346174
commit 502763fcc7

View File

@ -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) {