vlc | branch: master | Steve Lhomme <[email protected]> | Thu Jan 21 08:52:15 2021 +0100| [a5d85a5f248b12a2ef78041cf2dfa14a6106d66d] | committer: Steve Lhomme
video_output: count the time to do the prepare to determine if a frame is late The system_pts is the date we should do the swap (vd->display) for the picture. But between now and the time we do the swap, there is also the prepare (+ static filtering) that will happen. We are late if now+that duration is after the date we should do the swap. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a5d85a5f248b12a2ef78041cf2dfa14a6106d66d --- src/video_output/video_output.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index eeb49e9ab6..19fe940fd8 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -1094,7 +1094,9 @@ static picture_t *ThreadDisplayPreparePicture(vout_thread_sys_t *vout, bool reus } else if (is_late_dropped && !decoded->b_force) { - vlc_tick_t late = system_now - system_pts; + const vlc_tick_t prepare_decoded_duration = vout_chrono_GetHigh(&sys->render) + + VOUT_MWAIT_TOLERANCE; + vlc_tick_t late = system_now + prepare_decoded_duration - system_pts; vlc_tick_t late_threshold; if (decoded->format.i_frame_rate && decoded->format.i_frame_rate_base) { _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
