[vlc-devel] [PATCH] decoder: fix audio-desync with a value > 3000ms

Thomas Guillem thomas at gllm.fr
Fri Apr 17 15:35:20 CEST 2015


Add the delay to ts_bound when calling input_clock_ConvertTS (For audio,
i_ts_bound is 3000ms).

Fixes #4847
---
 src/input/decoder.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 79a83c1..271ea5a 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -670,6 +670,8 @@ static void DecoderFixTs( decoder_t *p_dec, mtime_t *pi_ts0, mtime_t *pi_ts1,
         *pi_ts0 += i_es_delay;
         if( pi_ts1 && *pi_ts1 > VLC_TS_INVALID )
             *pi_ts1 += i_es_delay;
+        if( i_ts_bound != INT64_MAX )
+            i_ts_bound += p_owner->i_ts_delay;
         if( input_clock_ConvertTS( VLC_OBJECT(p_dec), p_clock, &i_rate, pi_ts0, pi_ts1, i_ts_bound ) ) {
             if( pi_ts1 != NULL )
                 msg_Err(p_dec, "Could not convert timestamps %"PRId64
-- 
2.1.3




More information about the vlc-devel mailing list