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

stream_Demux: remove unsafe pointer access

In the original stream_Demux (from 2004), there was a lock. But then
it vanished in a big input "rework"... Anyway, killing the demux
explicitly should not be needed: The underlying stream will return EOF
and any sane demux will return on EOF.
parent cb9a583c
......@@ -118,9 +118,6 @@ static void DStreamDelete( stream_t *s )
block_t *p_empty;
vlc_object_kill( s );
#warning FIXME: not thread-safe:
if( p_sys->p_demux )
vlc_object_kill( p_sys->p_demux );
p_empty = block_New( s, 1 ); p_empty->i_buffer = 0;
block_FifoPut( p_sys->p_fifo, p_empty );
vlc_join( p_sys->thread, NULL );
......@@ -293,12 +290,11 @@ static void* DStreamThread( void *obj )
p_sys->p_demux = p_demux;
/* Main loop */
while( vlc_object_alive( s ) && vlc_object_alive( p_demux ) )
while( vlc_object_alive( s ) )
{
if( demux_Demux( p_demux ) <= 0 ) break;
}
vlc_restorecancel( canc );
vlc_object_kill( p_demux );
return NULL;
}
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