Commit 534a8122 authored by Clément Stenac's avatar Clément Stenac

Fix subtitle delay < 0

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