[vlc-commits] es_out: always return the negative delay in EsOutGetTracksDelay

Steve Lhomme git at videolan.org
Mon Aug 17 16:14:25 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Aug 13 07:46:45 2020 +0200| [5243396adb6763e1d739a9cd37c3175dc6351e0c] | committer: Steve Lhomme

es_out: always return the negative delay in EsOutGetTracksDelay

The value is initialized to 0 and set values lower than its initial value. So
we don't need to compare it to 0.

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

 src/input/es_out.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index ef6b1c9b86..7fad533e65 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -2966,7 +2966,7 @@ static vlc_tick_t EsOutGetTracksDelay(es_out_t *out)
         tracks_delay = __MIN(tracks_delay, p_sys->i_audio_delay);
     if (has_spu)
         tracks_delay = __MIN(tracks_delay, p_sys->i_spu_delay);
-    return tracks_delay < 0 ? -tracks_delay : 0;
+    return -tracks_delay;
 }
 
 /**



More information about the vlc-commits mailing list