diff options
-rw-r--r-- | player/audio.c | 4 | ||||
-rw-r--r-- | player/core.h | 2 | ||||
-rw-r--r-- | player/video.c | 2 |
3 files changed, 2 insertions, 6 deletions
diff --git a/player/audio.c b/player/audio.c index 47acffb8b7..ddf32fb277 100644 --- a/player/audio.c +++ b/player/audio.c @@ -512,8 +512,8 @@ static bool get_sync_samples(struct MPContext *mpctx, int *skip) if (sync_to_video) { 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; + if (mpctx->video_pts != MP_NOPTS_VALUE) + sync_pts = mpctx->video_pts - opts->audio_delay; } else if (mpctx->hrseek_active) { sync_pts = mpctx->hrseek_pts; } diff --git a/player/core.h b/player/core.h index 879470724e..7d34380e87 100644 --- a/player/core.h +++ b/player/core.h @@ -351,8 +351,6 @@ typedef struct MPContext { * (or at least queued to be flipped by VO) */ double video_pts; double last_seek_pts; - // Mostly unused; for proper audio resync on speed changes. - double video_next_pts; // As video_pts, but is not reset when seeking away. (For the very short // period of time until a new frame is decoded and shown.) double last_vo_pts; diff --git a/player/video.c b/player/video.c index bee6cd5cb0..1b30b398d8 100644 --- a/player/video.c +++ b/player/video.c @@ -254,7 +254,6 @@ void reset_video_state(struct MPContext *mpctx) mpctx->delay = 0; mpctx->time_frame = 0; mpctx->video_pts = MP_NOPTS_VALUE; - mpctx->video_next_pts = MP_NOPTS_VALUE; mpctx->num_past_frames = 0; mpctx->total_avsync_change = 0; mpctx->last_av_difference = 0; @@ -632,7 +631,6 @@ static void handle_new_frame(struct MPContext *mpctx) frame_time = 0; } } - mpctx->video_next_pts = pts; mpctx->delay -= frame_time; if (mpctx->video_status >= STATUS_PLAYING) { mpctx->time_frame += frame_time / mpctx->video_speed; |