[vlc-commits] video_output: express late frame threshold as the frame duration divided by 2
Steve Lhomme
git at videolan.org
Tue Oct 20 11:02:58 CEST 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Oct 16 15:22:23 2020 +0200| [9c502988c341fd9f133dbfc064dd51e7422a699f] | committer: Steve Lhomme
video_output: express late frame threshold as the frame duration divided by 2
Rather than something looking like a delay.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9c502988c341fd9f133dbfc064dd51e7422a699f
---
src/video_output/video_output.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index d970ddae9f..b3cecff36d 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1098,8 +1098,10 @@ static int ThreadDisplayPreparePicture(vout_thread_sys_t *vout, bool reuse_decod
late = system_now - system_pts;
vlc_tick_t late_threshold;
- if (decoded->format.i_frame_rate && decoded->format.i_frame_rate_base)
- late_threshold = VLC_TICK_FROM_MS(500) * decoded->format.i_frame_rate_base / decoded->format.i_frame_rate;
+ 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;
if (late > late_threshold) {
More information about the vlc-commits
mailing list