[vlc-commits] video_output: replace hardcoded CLOCK_FREQ multiples by VLC_TICK_FROM_MS()
Steve Lhomme
git at videolan.org
Fri Jul 6 16:07:25 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Jun 14 14:17:46 2018 +0200| [16cce259884d18d0f5754aaa763a9a3a3900de45] | committer: Steve Lhomme
video_output: replace hardcoded CLOCK_FREQ multiples by VLC_TICK_FROM_MS()
Easier to read and more explicit.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=16cce259884d18d0f5754aaa763a9a3a3900de45
---
src/video_output/video_output.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index bfa76856f0..acea70ac74 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -849,7 +849,7 @@ static int ThreadDisplayPreparePicture(vout_thread_t *vout, bool reuse, bool fra
if (is_late_dropped && !decoded->b_force) {
vlc_tick_t late_threshold;
if (decoded->format.i_frame_rate && decoded->format.i_frame_rate_base)
- late_threshold = ((CLOCK_FREQ/2) * decoded->format.i_frame_rate_base) / decoded->format.i_frame_rate;
+ late_threshold = VLC_TICK_FROM_MS(500) * decoded->format.i_frame_rate_base / decoded->format.i_frame_rate;
else
late_threshold = VOUT_DISPLAY_LATE_THRESHOLD;
const vlc_tick_t predicted = vlc_tick_now() + 0; /* TODO improve */
More information about the vlc-commits
mailing list