Commit 534a8122 authored by zorglub's avatar zorglub

Fix subtitle delay < 0

DAAP compile fix
parent be52d3fe
......@@ -508,7 +508,7 @@ static int Demux( demux_t *p_demux )
if( p_sys->i_subtitle >= p_sys->i_subtitles )
return 0;
i_maxdate = p_sys->i_next_demux_date;
i_maxdate = p_sys->i_next_demux_date - var_GetTime( p_demux->p_parent, "spu-delay" );;
if( i_maxdate <= 0 && p_sys->i_subtitle < p_sys->i_subtitles )
{
/* Should not happen */
......
......@@ -632,7 +632,7 @@ static void FreeHost( services_discovery_t *p_sd, dhost_t *p_host )
FIND_ANYWHERE );
if( p_playlist )
{
playlist_NodeDelete( p_playlist, p_host->p_node, VLC_TRUE );
playlist_NodeDelete( p_playlist, p_host->p_node, VLC_TRUE , VLC_TRUE);
vlc_object_release( p_playlist );
}
......
......@@ -694,14 +694,16 @@ static int EsDelayCallback ( vlc_object_t *p_this, char const *psz_cmd,
{
input_thread_t *p_input = (input_thread_t*)p_this;
/*Change i_pts_delay to make sure es are decoded in time*/
if (newval.i_int < 0 || oldval.i_int < 0 )
{
p_input->i_pts_delay -= newval.i_int - oldval.i_int;
}
if( !strcmp( psz_cmd, "audio-delay" ) )
{
/*Change i_pts_delay to make sure es are decoded in time*/
if (newval.i_int < 0 || oldval.i_int < 0 )
{
p_input->i_pts_delay -= newval.i_int - oldval.i_int;
}
input_ControlPush( p_input, INPUT_CONTROL_SET_AUDIO_DELAY, &newval );
}
else if( !strcmp( psz_cmd, "spu-delay" ) )
input_ControlPush( p_input, INPUT_CONTROL_SET_SPU_DELAY, &newval );
return VLC_SUCCESS;
......
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