Commit d568542d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Force the sending threads to wakeup at exit - closes #1292

parent 56ec18e7
......@@ -302,6 +302,8 @@ static void Close( vlc_object_t * p_this )
int i;
vlc_object_kill( p_sys->p_thread );
block_FifoWake( p_sys->p_thread->p_fifo );
for( i = 0; i < 10; i++ )
{
block_t *p_dummy = block_New( p_access, p_sys->i_mtu );
......@@ -485,6 +487,8 @@ static void ThreadWrite( vlc_object_t *p_this )
}
#endif
p_pk = block_FifoGet( p_thread->p_fifo );
if( p_pk == NULL )
continue; /* forced wake-up */
i_date = p_thread->i_caching + p_pk->i_dts;
if( i_date_last > 0 )
......
......@@ -1135,6 +1135,7 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )
sout_stream_sys_t *p_sys = p_stream->p_sys;
vlc_object_kill( id );
block_FifoWake( id->p_fifo );
vlc_mutex_lock( &p_sys->lock_es );
TAB_REMOVE( p_sys->i_es, p_sys->es, id );
......@@ -1311,6 +1312,9 @@ static void ThreadSend( vlc_object_t *p_this )
while( !id->b_die )
{
block_t *out = block_FifoGet( id->p_fifo );
if( out == NULL )
continue; /* Forced wakeup */
mtime_t i_date = out->i_dts + i_caching;
ssize_t len = out->i_buffer;
......
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