summaryrefslogtreecommitdiffstats
path: root/player/audio.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-08-14 14:02:13 +0200
committerwm4 <wm4@nowhere>2017-08-14 14:02:13 +0200
commit68201f4591bd07c7d7027d50fdb6cc5500c7382c (patch)
treefeb6fe9402487d6ce8a11656eda548e21c29b7b9 /player/audio.c
parentb6d79deebbbb9aa95b176ad099abd5695d0a2366 (diff)
downloadmpv-68201f4591bd07c7d7027d50fdb6cc5500c7382c.tar.bz2
mpv-68201f4591bd07c7d7027d50fdb6cc5500c7382c.tar.xz
player: make refresh seeks slightly more robust
Refresh seeks are automatically issued when changing filters, which improves user experience if these filters change buffering or such. The refresh seek could actually overwrite a previously ongoing seek: set pause yes set time-pos 10 set vf "" Here, the video code issued a refresh seek to the previous video position, which could be different from the previously triggered (and still ongoing) seek, this overwriting the seek. Factor all refresh seek handling into a new function, and make it handle ongoing seeks correctly. Remove the weird new canonical_pts field, which actually had no use. Fixes #4757.
Diffstat (limited to 'player/audio.c')
-rw-r--r--player/audio.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/player/audio.c b/player/audio.c
index 3fdd9ed28b..fcc442b974 100644
--- a/player/audio.c
+++ b/player/audio.c
@@ -279,12 +279,8 @@ int reinit_audio_filters(struct MPContext *mpctx)
// Only force refresh if the amount of dropped buffered data is going to
// cause "issues" for the A/V sync logic.
- if (mpctx->audio_status == STATUS_PLAYING &&
- mpctx->playback_pts != MP_NOPTS_VALUE && delay > 0.2)
- {
- queue_seek(mpctx, MPSEEK_ABSOLUTE, mpctx->playback_pts,
- MPSEEK_EXACT, 0);
- }
+ if (mpctx->audio_status == STATUS_PLAYING && delay > 0.2)
+ issue_refresh_seek(mpctx, MPSEEK_EXACT);
return 1;
}