[vlc-devel] commit: Fixed pts delay with non zero audio/spu delay. (Laurent Aimar )

git version control git at videolan.org
Wed Jan 21 19:10:21 CET 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Jan 21 19:04:53 2009 +0100| [c15dfbb20477e3cb8605cb59200872143873045a] | committer: Laurent Aimar 

Fixed pts delay with non zero audio/spu delay.

Thanks linkfanel for noticing it.

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

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

diff --git a/src/input/input.c b/src/input/input.c
index e20d742..0cf2259 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -1052,11 +1052,11 @@ static void UpdatePtsDelay( input_thread_t *p_input )
         i_pts_delay = 0;
 
     /* Take care of audio/spu delay */
-    const int i_audio_delay = var_GetTime( p_input, "audio-delay" );
-    const int i_spu_delay   = var_GetTime( p_input, "spu-delay" );
-    const int i_extra_delay = __MIN( i_audio_delay, i_spu_delay );
+    const mtime_t i_audio_delay = var_GetTime( p_input, "audio-delay" );
+    const mtime_t i_spu_delay   = var_GetTime( p_input, "spu-delay" );
+    const mtime_t i_extra_delay = __MIN( i_audio_delay, i_spu_delay );
     if( i_extra_delay < 0 )
-        i_pts_delay -= i_extra_delay * INT64_C(1000);
+        i_pts_delay -= i_extra_delay;
 
     /* Update cr_average depending on the caching */
     const int i_cr_average = var_GetInteger( p_input, "cr-average" ) * i_pts_delay / DEFAULT_PTS_DELAY;




More information about the vlc-devel mailing list