Commit af698180 authored by Thomas Guillem's avatar Thomas Guillem

decoder: fix audio-desync with a value > 3000ms

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

Fixes #4847
parent bf445475
...@@ -670,6 +670,8 @@ static void DecoderFixTs( decoder_t *p_dec, mtime_t *pi_ts0, mtime_t *pi_ts1, ...@@ -670,6 +670,8 @@ static void DecoderFixTs( decoder_t *p_dec, mtime_t *pi_ts0, mtime_t *pi_ts1,
*pi_ts0 += i_es_delay; *pi_ts0 += i_es_delay;
if( pi_ts1 && *pi_ts1 > VLC_TS_INVALID ) if( pi_ts1 && *pi_ts1 > VLC_TS_INVALID )
*pi_ts1 += i_es_delay; *pi_ts1 += i_es_delay;
if( i_ts_bound != INT64_MAX )
i_ts_bound += i_es_delay;
if( input_clock_ConvertTS( VLC_OBJECT(p_dec), p_clock, &i_rate, pi_ts0, pi_ts1, i_ts_bound ) ) { if( input_clock_ConvertTS( VLC_OBJECT(p_dec), p_clock, &i_rate, pi_ts0, pi_ts1, i_ts_bound ) ) {
if( pi_ts1 != NULL ) if( pi_ts1 != NULL )
msg_Err(p_dec, "Could not convert timestamps %"PRId64 msg_Err(p_dec, "Could not convert timestamps %"PRId64
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment