From f1d161d55f458cf47e63d1ab9ddf08859019dd8a Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 12 Aug 2017 23:08:48 +0200 Subject: player: make --lavfi-complex changeable at runtime Tends to be somewhat glitchy if subtitles are enabled, and you enable and disable tracks. On error, this will disable --lavfi-complex, which will result in whatever behavior. --- player/playloop.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'player/playloop.c') diff --git a/player/playloop.c b/player/playloop.c index 736a8f5951..0d3409065b 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -376,6 +376,8 @@ static void mp_seek(MPContext *mpctx, struct seek_params seek) !hr_seek && !(demux_flags & SEEK_FORWARD); mpctx->ab_loop_clip = mpctx->last_seek_pts < opts->ab_loop[1]; + + mpctx->canonical_pts = mpctx->last_seek_pts; } // This combines consecutive seek requests. @@ -956,6 +958,8 @@ static void handle_playback_time(struct MPContext *mpctx) { mpctx->playback_pts = playing_audio_pts(mpctx); } + if (mpctx->playback_pts != MP_NOPTS_VALUE) + mpctx->canonical_pts = mpctx->playback_pts; } // We always make sure audio and video buffers are filled before actually -- cgit v1.2.3