1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-03 04:37:54 +00:00

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.
This commit is contained in:
wm4 2013-11-29 15:42:19 +01:00
parent 2ec629bede
commit 42714f9a99

View File

@ -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;