[vlc-devel] commit: Do not forget to use the drift when converting stream to system clock. ( Laurent Aimar )

git version control git at videolan.org
Mon Jul 13 21:16:47 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Jul 13 00:06:45 2009 +0200| [a4087f0689c8216cbf3dda0b890cb1c3b30b2058] | committer: Laurent Aimar 

Do not forget to use the drift when converting stream to system clock.

It has no consequence (because of the way we actually use the clock) but
it is more consistent.

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

 src/input/clock.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/input/clock.c b/src/input/clock.c
index dc010e5..0b24c29 100644
--- a/src/input/clock.c
+++ b/src/input/clock.c
@@ -274,7 +274,7 @@ void input_clock_ChangeRate( input_clock_t *cl, int i_rate )
     /* Move the reference point */
     if( cl->b_has_reference )
     {
-        cl->last.i_system = ClockStreamToSystem( cl, cl->last.i_stream );
+        cl->last.i_system = ClockStreamToSystem( cl, cl->last.i_stream + AvgGet( &cl->drift ) );
         cl->ref = cl->last;
     }
 
@@ -318,7 +318,7 @@ mtime_t input_clock_GetWakeup( input_clock_t *cl )
 
     /* Synchronized, we can wait */
     if( cl->b_has_reference )
-        i_wakeup = ClockStreamToSystem( cl, cl->last.i_stream );
+        i_wakeup = ClockStreamToSystem( cl, cl->last.i_stream + AvgGet( &cl->drift ) );
 
     vlc_mutex_unlock( &cl->lock );
 




More information about the vlc-devel mailing list