[vlc-commits] video_output: more accurate value for dropped_current_frame

Steve Lhomme git at videolan.org
Tue Mar 9 14:33:05 UTC 2021


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Feb 19 14:47:00 2021 +0100| [a8e0c1574c5aa187acecf202f72c64194dc43dab] | committer: Steve Lhomme

video_output: more accurate value for dropped_current_frame

If this is the first frame we didn't actually drop a frame.

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

 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 0e23e3f4ed..fc913c06ba 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1437,10 +1437,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;
         }



More information about the vlc-commits mailing list