mirror of
https://github.com/mpv-player/mpv
synced 2024-12-26 00:42:57 +00:00
player: simplify audio sync pts calculation
This was done for symmetry with adjust_sync(). But mpctx->delay is always 0 at this point, so prefer slightly simpler code.
This commit is contained in:
parent
555ecbb70e
commit
3b95dd47d5
@ -464,7 +464,7 @@ static bool get_sync_samples(struct MPContext *mpctx, int *skip)
|
||||
if (mpctx->video_status < STATUS_READY)
|
||||
return false; // wait until we know a video PTS
|
||||
if (mpctx->video_next_pts != MP_NOPTS_VALUE)
|
||||
sync_pts = mpctx->video_next_pts - (opts->audio_delay - mpctx->delay);
|
||||
sync_pts = mpctx->video_next_pts - opts->audio_delay;
|
||||
} else if (mpctx->hrseek_active) {
|
||||
sync_pts = mpctx->hrseek_pts;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user