[vlc-commits] video_output: remove decoded timestamp variable

Steve Lhomme git at videolan.org
Tue Jan 19 12:29:52 UTC 2021


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Nov 18 13:33:48 2020 +0100| [e9f445529f5b47de74cfdfc5e4d7c13d5242dd3b] | committer: Steve Lhomme

video_output: remove decoded timestamp variable

It was always set when displayed.decoded was set. So we use displayed.decoded
directly.

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

 src/video_output/video_output.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 1dec6e13d6..63d19cee16 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -123,7 +123,6 @@ typedef struct vout_thread_sys_t
 
     struct {
         vlc_tick_t  date;
-        vlc_tick_t  timestamp;
         bool        is_interlaced;
         picture_t   *decoded; // decoded picture before passed through chain_static
         picture_t   *current;
@@ -1130,7 +1129,6 @@ static picture_t *ThreadDisplayPreparePicture(vout_thread_sys_t *vout, bool reus
             picture_Release(sys->displayed.decoded);
 
         sys->displayed.decoded       = picture_Hold(decoded);
-        sys->displayed.timestamp     = decoded->date;
         sys->displayed.is_interlaced = !decoded->b_progressive;
 
         picture = filter_chain_VideoFilter(sys->filter.chain_static, sys->displayed.decoded);
@@ -1613,7 +1611,6 @@ static void vout_FlushUnlocked(vout_thread_sys_t *vout, bool below,
 
             sys->displayed.decoded   = NULL;
             sys->displayed.date      = VLC_TICK_INVALID;
-            sys->displayed.timestamp = VLC_TICK_INVALID;
         }
     }
 
@@ -1648,11 +1645,11 @@ void vout_NextPicture(vout_thread_t *vout, vlc_tick_t *duration)
     *duration = 0;
 
     vout_control_Hold(&sys->control);
-    if (sys->step.last == VLC_TICK_INVALID)
-        sys->step.last = sys->displayed.timestamp;
+    if (sys->step.last == VLC_TICK_INVALID && sys->displayed.decoded)
+        sys->step.last = sys->displayed.decoded->date;
 
     if (ThreadDisplayPicture(sys, NULL) == 0) {
-        sys->step.timestamp = sys->displayed.timestamp;
+        sys->step.timestamp = sys->displayed.decoded->date;
 
         if (sys->step.last != VLC_TICK_INVALID &&
             sys->step.timestamp > sys->step.last) {
@@ -1836,7 +1833,6 @@ static int vout_Start(vout_thread_sys_t *vout, vlc_video_context *vctx, const vo
     sys->displayed.current       = NULL;
     sys->displayed.decoded       = NULL;
     sys->displayed.date          = VLC_TICK_INVALID;
-    sys->displayed.timestamp     = VLC_TICK_INVALID;
     sys->displayed.is_interlaced = false;
 
     sys->step.last               = VLC_TICK_INVALID;



More information about the vlc-commits mailing list