From 5523370ab9dec95c73076d20ff6f5a9b800d60f3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 22 Aug 2014 14:21:26 +0200 Subject: player: don't clobber playback position on video end If video reaches EOF, and audio is also EOF (or is otherwise not meaningful, like audio disabled), then the playback position was briefly set to 0. Fix this by not trying to use a bogus audio PTS. CC: @mpv-player/stable (maybe) --- player/playloop.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/player/playloop.c b/player/playloop.c index dad586332a..1475d3b700 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -888,12 +888,10 @@ void run_playloop(struct MPContext *mpctx) } if (mpctx->video_status == STATUS_EOF && - mpctx->audio_status >= STATUS_PLAYING) + mpctx->audio_status >= STATUS_PLAYING && + mpctx->audio_status < STATUS_EOF) { - double a_pos = 0; - if (mpctx->d_audio) - a_pos = playing_audio_pts(mpctx); - mpctx->playback_pts = a_pos; + mpctx->playback_pts = playing_audio_pts(mpctx); } handle_dummy_ticks(mpctx); -- cgit v1.2.3