Commit 3fa85e6a authored by François Cartegnie's avatar François Cartegnie 🤞

access: live555: define and set pcr offset

tries to have a pcr delay between 250ms and 500ms
parent fd09bcfd
......@@ -274,6 +274,9 @@ static unsigned char* parseVorbisConfigStr( char const* configStr,
static char *passwordLessURL( vlc_url_t *url );
#define PCR_OBS (CLOCK_FREQ / 4)
#define PCR_OFF PCR_OBS
/*****************************************************************************
* DemuxOpen:
*****************************************************************************/
......@@ -1379,12 +1382,13 @@ static int Demux( demux_t *p_demux )
tk->i_next_block_flags |= BLOCK_FLAG_DISCONTINUITY;
}
if( p_sys->i_pcr != VLC_TS_INVALID )
es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_pcr );
es_out_SetPCR( p_demux->out, VLC_TS_0 +
__MAX(0, p_sys->i_pcr - PCR_OFF) );
}
else if( p_sys->i_pcr == VLC_TS_INVALID ||
i_minpcr > p_sys->i_pcr + CLOCK_FREQ / 4 )
i_minpcr > p_sys->i_pcr + PCR_OBS )
{
p_sys->i_pcr = i_minpcr;
p_sys->i_pcr = __MAX(0, i_minpcr - PCR_OFF);
if( p_sys->i_pcr != VLC_TS_INVALID )
es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_pcr );
}
......
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