[vlc-devel] [PATCH 06/16] video_output: don't set a value on unused variable

Steve Lhomme robux4 at ycbcr.xyz
Fri Oct 16 16:26:37 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 | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index aa7056a5f22..0f4e5c79929 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1502,13 +1502,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;
-        }
-        else
+        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