[vlc-devel] [PATCH] video_output: more accurate value for dropped_current_frame

Steve Lhomme robux4 at ycbcr.xyz
Mon Feb 22 06:52:05 UTC 2021


If this is the first frame we didn't actually drop a frame.
---
 src/video_output/video_output.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index c176c274334..4961a894ea3 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1455,10 +1455,10 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
                 date_refresh = swap_next_pts - render_delay;
 
             // next frame will still need some waiting before display
-            dropped_current_frame = true;
+            dropped_current_frame = sys->displayed.current != NULL;
             render_now = false;
 
-            if (likely(sys->displayed.current != NULL))
+            if (likely(dropped_current_frame))
                 picture_Release(sys->displayed.current);
             sys->displayed.current = next;
         }
-- 
2.29.2



More information about the vlc-devel mailing list