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:
wm4 2014-08-22 14:21:26 +02:00
parent e9e73f8d03
commit 75005ec06d
1 changed files with 3 additions and 5 deletions

View File

@ -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);