summaryrefslogtreecommitdiffstats
path: root/player/video.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/video.c')
-rw-r--r--player/video.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/player/video.c b/player/video.c
index 4e89416db7..bd9c82e788 100644
--- a/player/video.c
+++ b/player/video.c
@@ -215,6 +215,7 @@ void reset_video_state(struct MPContext *mpctx)
mpctx->video_pts = MP_NOPTS_VALUE;
mpctx->video_next_pts = MP_NOPTS_VALUE;
mpctx->total_avsync_change = 0;
+ mpctx->last_av_difference = 0;
mpctx->dropped_frames_total = 0;
mpctx->dropped_frames = 0;
mpctx->drop_message_shown = 0;
@@ -737,7 +738,7 @@ static void update_avsync_after_frame(struct MPContext *mpctx)
if (mpctx->time_frame > 0)
mpctx->last_av_difference += mpctx->time_frame * opts->playback_speed;
if (a_pos == MP_NOPTS_VALUE || mpctx->video_pts == MP_NOPTS_VALUE) {
- mpctx->last_av_difference = MP_NOPTS_VALUE;
+ mpctx->last_av_difference = 0;
} else if (fabs(mpctx->last_av_difference) > 0.5 && !mpctx->drop_message_shown) {
MP_WARN(mpctx, "%s", av_desync_help_text);
mpctx->drop_message_shown = true;