[vlc-devel] [PATCH v2 01/18] video_output: don't set a value on unused variable

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


At this stage paused will not be used anymore. No need to set the value.

Only keep the "else" part of the "if".
---
 src/video_output/video_output.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index dc5e602002e..ad60942348a 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1507,12 +1507,7 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
         const vlc_tick_t next_system_pts =
             vlc_clock_ConvertToSystem(sys->clock, system_now,
                                       sys->displayed.next->date, sys->rate);
-        if (unlikely(next_system_pts == INT64_MAX))
-        {
-            /* The clock was just paused, don't display the next frame (keep
-             * the current one). */
-            paused = true;
-        }
+        if (likely(next_system_pts != INT64_MAX))
         {
             date_next = next_system_pts - render_delay;
             if (date_next <= system_now)
-- 
2.26.2



More information about the vlc-devel mailing list