diff options
Diffstat (limited to 'player/video.c')
-rw-r--r-- | player/video.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/player/video.c b/player/video.c index ff72f92d8e..847a5b56d9 100644 --- a/player/video.c +++ b/player/video.c @@ -729,8 +729,9 @@ static void adjust_sync(struct MPContext *mpctx, double v_pts, double frame_time double av_delay = a_pts - v_pts; double change = av_delay * 0.1; + double factor = fabs(av_delay) < 0.3 ? 0.1 : 0.4; double max_change = opts->default_max_pts_correction >= 0 ? - opts->default_max_pts_correction : frame_time * 0.1; + opts->default_max_pts_correction : frame_time * factor; if (change < -max_change) change = -max_change; else if (change > max_change) @@ -1423,6 +1424,9 @@ void write_video(struct MPContext *mpctx) mpctx->time_frame -= get_relative_time(mpctx); update_avsync_before_frame(mpctx); + // Enforce timing subtitles to video frames. + osd_set_force_video_pts(mpctx->osd, MP_NOPTS_VALUE); + if (!update_subtitles(mpctx, mpctx->next_frames[0]->pts)) { MP_VERBOSE(mpctx, "Video frame delayed due waiting on subtitles.\n"); return; |