[vlc-devel] [PATCH] demux: adaptive: remove 100ms PCR delay
Zhao Zhili
quinkblack at foxmail.com
Thu Dec 28 04:23:15 CET 2017
On 2017年12月28日 11:14, Zhao Zhili wrote:
> 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);
Should I remove the VLC_TS_0 and/or std::max() parts too?
More information about the vlc-devel
mailing list