[vlc-commits] input: turn the hardcoded buffer check period into a CLOCK_FREQ based value

Steve Lhomme git at videolan.org
Sat May 5 18:10:29 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Sat May  5 10:01:56 2018 +0200| [eeb4f5c7ace63f8167c84f79a62188a223486c67] | committer: Rémi Denis-Courmont

input: turn the hardcoded buffer check period into a CLOCK_FREQ based value

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

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

 src/input/input.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/input/input.c b/src/input/input.c
index a82b1fc761..ff2f894a8c 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -774,9 +774,9 @@ static void MainLoop( input_thread_t *p_input, bool b_interactive )
                 mtime_t now = mdate();
 
                 /* Recheck ES buffer level every 20 ms when seeking */
-                if( now < i_last_seek_mdate + INT64_C(125000)
-                 && (i_deadline < 0 || i_deadline > now + INT64_C(20000)) )
-                    i_deadline = now + INT64_C(20000);
+                if( now < i_last_seek_mdate + CLOCK_FREQ/8
+                 && (i_deadline < 0 || i_deadline > now + CLOCK_FREQ/50) )
+                    i_deadline = now + CLOCK_FREQ/50;
                 else
                     b_postpone = false;
             }



More information about the vlc-commits mailing list