From 42714f9a998ecb7ec28a94178f1b547df9c34e54 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 29 Nov 2013 15:42:19 +0100 Subject: player: always reset some variables on seek These were confined to the video path, but resetting them even if no video is available shouldn't really matter. Always resetting them makes the logic easier to follow, I think. --- mpvcore/player/playloop.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mpvcore/player/playloop.c b/mpvcore/player/playloop.c index a0127f7339..b069e5c3f7 100644 --- a/mpvcore/player/playloop.c +++ b/mpvcore/player/playloop.c @@ -172,10 +172,6 @@ static void seek_reset(struct MPContext *mpctx, bool reset_ao) if (mpctx->d_video) { video_reset_decoding(mpctx->d_video); vo_seek_reset(mpctx->video_out); - mpctx->video_pts = MP_NOPTS_VALUE; - mpctx->video_next_pts = MP_NOPTS_VALUE; - mpctx->delay = 0; - mpctx->time_frame = 0; } if (mpctx->d_audio) { @@ -186,6 +182,10 @@ static void seek_reset(struct MPContext *mpctx, bool reset_ao) reset_subtitles(mpctx); + mpctx->video_pts = MP_NOPTS_VALUE; + mpctx->video_next_pts = MP_NOPTS_VALUE; + mpctx->delay = 0; + mpctx->time_frame = 0; mpctx->restart_playback = true; mpctx->hrseek_active = false; mpctx->hrseek_framedrop = false; -- cgit v1.2.3