summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-08-22 14:21:26 +0200
committerwm4 <wm4@nowhere>2014-08-22 14:22:06 +0200
commit75005ec06d13655340439450cd4663bdf7978411 (patch)
treebd89aaee88783ff4c62b4814f429825b11178fbd
parente9e73f8d035a0cbcf71c0eef3a402b49db2950f6 (diff)
downloadmpv-75005ec06d13655340439450cd4663bdf7978411.tar.bz2
mpv-75005ec06d13655340439450cd4663bdf7978411.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)
-rw-r--r--player/playloop.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/player/playloop.c b/player/playloop.c
index 50494809e3..d7fed6319a 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -860,12 +860,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);