[vlc-devel] [PATCH 06/21] video_output: rename refesh to current_needs_redisplay

Steve Lhomme robux4 at ycbcr.xyz
Tue Sep 15 14:36:11 CEST 2020


The boolean represents the expired VOUT_REDISPLAY_DELAY since the last display
of the current frame.
---
 src/video_output/video_output.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 92cc1ceea44..6d7990a5171 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1511,11 +1511,11 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
      *
      * So it will be done later.
      */
-    bool refresh = false;
+    bool current_needs_redisplay = false;
 
     if (sys->displayed.date != VLC_TICK_INVALID) {
         const vlc_tick_t date_refresh = sys->displayed.date + VOUT_REDISPLAY_DELAY - render_delay;
-        refresh = date_refresh <= system_now;
+        current_needs_redisplay = date_refresh <= system_now; // we passed the redisplay date
         if (deadline)
             *deadline = date_refresh;
     }
@@ -1544,9 +1544,9 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
         }
     }
 
-    bool force_refresh = !display_next_frame && refresh;
+    bool force_refresh = !display_next_frame && current_needs_redisplay;
 
-    if (!first && !refresh && !display_next_frame) {
+    if (!first && !current_needs_redisplay && !display_next_frame) {
         return VLC_EGENERIC;
     }
 
-- 
2.26.2



More information about the vlc-devel mailing list