mirror of https://github.com/mpv-player/mpv
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)
This commit is contained in:
parent
e9e73f8d03
commit
75005ec06d
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue