summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-29 15:42:19 +0100
committerwm4 <wm4@nowhere>2013-11-29 15:42:19 +0100
commit42714f9a998ecb7ec28a94178f1b547df9c34e54 (patch)
treeae9f82fd5c1732f08f26adace765bffdf26f300d
parent2ec629bedec47be21da0742126ca4c6122186ccb (diff)
downloadmpv-42714f9a998ecb7ec28a94178f1b547df9c34e54.tar.bz2
mpv-42714f9a998ecb7ec28a94178f1b547df9c34e54.tar.xz
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.
-rw-r--r--mpvcore/player/playloop.c8
1 files 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;