summaryrefslogtreecommitdiffstats
path: root/player/playloop.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-08-22 14:21:26 +0200
committerAlessandro Ghedini <alessandro@ghedini.me>2014-08-25 11:23:26 +0200
commit5523370ab9dec95c73076d20ff6f5a9b800d60f3 (patch)
treecd61b72706c90f806d9df15bdf5884bc051d0d5d /player/playloop.c
parent8c7d61f1d94ece8c35b6bb83a7023542e2cc1182 (diff)
downloadmpv-5523370ab9dec95c73076d20ff6f5a9b800d60f3.tar.bz2
mpv-5523370ab9dec95c73076d20ff6f5a9b800d60f3.tar.xz
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)
Diffstat (limited to 'player/playloop.c')
-rw-r--r--player/playloop.c8
1 files 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);