[vlc-devel] [PATCH 09/16] video_output: remove uneeded loop on displayed.next reading

Steve Lhomme robux4 at ycbcr.xyz
Fri Oct 16 16:26:40 CEST 2020


If the value is set we never read it.
If the value is not set we read it. Then the loop exits, regardless if we got a
value or not.
---
 src/video_output/video_output.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index ff0a2e26123..ede7a2ed242 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1486,12 +1486,10 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
 
     if (!paused || frame_by_frame)
     {
-        while (!sys->displayed.next)
+        if (!sys->displayed.next)
         {
             sys->displayed.next =
                 ThreadDisplayPreparePicture(vout, false, frame_by_frame, &paused);
-            if (!sys->displayed.next)
-                break;
         }
     }
 
-- 
2.26.2



More information about the vlc-devel mailing list