[vlc-devel] [PATCH v2 11/18] video_output: rename is_forced to immediate

Steve Lhomme robux4 at ycbcr.xyz
Wed Sep 16 13:14:37 CEST 2020


That's what this flag is about.

No functional changes.
---
 src/video_output/video_output.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 299ee1e0728..26e64715aeb 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1226,7 +1226,7 @@ static picture_t *ConvertRGB32AndBlend(vout_thread_sys_t *vout, picture_t *pic,
     return NULL;
 }
 
-static int ThreadDisplayRenderPicture(vout_thread_sys_t *vout, bool is_forced)
+static int ThreadDisplayRenderPicture(vout_thread_sys_t *vout, bool immediate)
 {
     vout_thread_sys_t *sys = vout;
 
@@ -1268,7 +1268,7 @@ static int ThreadDisplayRenderPicture(vout_thread_sys_t *vout, bool is_forced)
         if (unlikely(render_subtitle_date == INT64_MAX))
         {
             render_subtitle_date = system_now;
-            is_forced = true;
+            immediate = true;
         }
     }
 
@@ -1399,7 +1399,7 @@ static int ThreadDisplayRenderPicture(vout_thread_sys_t *vout, bool is_forced)
 
     system_now = vlc_tick_now();
     const vlc_tick_t pts = todisplay->date;
-    vlc_tick_t system_pts = is_forced ? system_now :
+    vlc_tick_t system_pts = immediate ? system_now :
         vlc_clock_ConvertToSystem(sys->clock, system_now, pts, sys->rate);
     if (unlikely(system_pts == INT64_MAX))
     {
@@ -1407,7 +1407,7 @@ static int ThreadDisplayRenderPicture(vout_thread_sys_t *vout, bool is_forced)
          * picture, display the current picture anyway and force the rendering
          * to now. */
         system_pts = system_now;
-        is_forced = true;
+        immediate = true;
     }
 
     const unsigned frame_rate = todisplay->format.i_frame_rate;
@@ -1427,7 +1427,7 @@ static int ThreadDisplayRenderPicture(vout_thread_sys_t *vout, bool is_forced)
 #endif
 
     system_now = vlc_tick_now();
-    if (!is_forced)
+    if (!immediate)
     {
         if (unlikely(system_now > system_pts))
         {
@@ -1564,8 +1564,8 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
         return VLC_EGENERIC;
 
     /* display the picture immediately */
-    bool is_forced = frame_by_frame || force_refresh || sys->displayed.current->b_force;
-    int ret = ThreadDisplayRenderPicture(vout, is_forced);
+    bool immediate = frame_by_frame || force_refresh || sys->displayed.current->b_force;
+    int ret = ThreadDisplayRenderPicture(vout, immediate);
     return force_refresh ? VLC_EGENERIC : ret;
 }
 
-- 
2.26.2



More information about the vlc-devel mailing list