[vlc-devel] [PATCH 3/4] video_output: use the actual frame rate to estimate too late frames

Steve Lhomme robux4 at ycbcr.xyz
Thu Jan 21 12:09:59 UTC 2021


With a more accurate value of the lateness we don't need to restrict it to
half a frame. There is still the VOUT_MWAIT_TOLERANCE which ensures a frame
that is considered not late should be around 4ms early.
---
 src/video_output/video_output.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index ccbf099eade..d14e5cddaf5 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1103,7 +1103,6 @@ static picture_t *ThreadDisplayPreparePicture(vout_thread_sys_t *vout, bool reus
                     vlc_tick_t late_threshold;
                     if (decoded->format.i_frame_rate && decoded->format.i_frame_rate_base) {
                         late_threshold = vlc_tick_from_samples(decoded->format.i_frame_rate_base, decoded->format.i_frame_rate);
-                        late_threshold /=  2;
                     }
                     else
                         late_threshold = VOUT_DISPLAY_LATE_THRESHOLD;
-- 
2.29.2



More information about the vlc-devel mailing list