[vlc-devel] [PATCH] demux: adaptive: remove 100ms PCR delay

Francois Cartegnie fcvlcdev at free.fr
Fri Dec 29 12:44:09 CET 2017


Le 28/12/2017 à 04:14, Zhao Zhili a écrit :
> The 100ms PCR delay should be useless after 482db58. Remove the delay
> is helpful to minimize the possibility of audio playback too early:
> 
> Before apply the patch:
> main audio output warning: playback way too early (-184726): playing silence
> 
> After apply the patch:
> main audio output warning: playback too early (-85880): down-sampling
> ---
>  modules/demux/adaptive/PlaylistManager.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/modules/demux/adaptive/PlaylistManager.cpp b/modules/demux/adaptive/PlaylistManager.cpp
> index 700fa3a..ede6ebe 100644
> --- a/modules/demux/adaptive/PlaylistManager.cpp
> +++ b/modules/demux/adaptive/PlaylistManager.cpp
> @@ -499,7 +499,7 @@ int PlaylistManager::doDemux(int64_t increment)
>          if( demux.i_nzpcr != VLC_TS_INVALID && i_nzbarrier != demux.i_nzpcr )
>          {
>              demux.i_nzpcr = i_nzbarrier;
> -            mtime_t pcr = VLC_TS_0 + std::max(INT64_C(0), demux.i_nzpcr - CLOCK_FREQ / 10);
> +            mtime_t pcr = VLC_TS_0 + std::max(INT64_C(0), demux.i_nzpcr);
>              es_out_Control(p_demux->out, ES_OUT_SET_GROUP_PCR, 0, pcr);
>          }
>          vlc_mutex_unlock(&demux.lock);
> 

That's useless as early playback is not related to pcr.


-- 
Francois Cartegnie
VideoLAN - VLC Developer


More information about the vlc-devel mailing list