[vlc-commits] video_output: remove uneeded loop on displayed.next reading

Steve Lhomme git at videolan.org
Tue Oct 20 11:03:04 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Oct 16 13:56:17 2020 +0200| [b603a228ea368e7cbe23a5f3b587d32996f839ca] | committer: Steve Lhomme

video_output: remove uneeded loop on displayed.next reading

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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b603a228ea368e7cbe23a5f3b587d32996f839ca
---

 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 b155bbf54f..3514d6dee8 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1487,12 +1487,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;
         }
     }
 



More information about the vlc-commits mailing list