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

demux: remove invalid filter pointer

Accessing demux_t.p_next from outside the demux module violates
typing (pointer might be to stream_t), access (object is owned by
the demux filter) and threading rules (if demux filter were threaded,
though that´s currently theoretical).
parent bbb5df4b
......@@ -636,16 +636,13 @@ static bool demux_filter_enable_disable( demux_t *p_demux_chain,
const char* psz_demux, bool b_enable )
{
demux_t *p_demux = p_demux_chain;
while ( p_demux )
{
if( strcmp( module_get_name( p_demux->p_module, false ), psz_demux) == 0 ||
strcmp( module_get_name( p_demux->p_module, true ), psz_demux ) == 0 )
{
demux_Control( p_demux,
b_enable ? DEMUX_FILTER_ENABLE : DEMUX_FILTER_DISABLE );
return true;
}
p_demux = p_demux->p_next;
if( strcmp( module_get_name( p_demux->p_module, false ), psz_demux) == 0 ||
strcmp( module_get_name( p_demux->p_module, true ), psz_demux ) == 0 )
{
demux_Control( p_demux,
b_enable ? DEMUX_FILTER_ENABLE : DEMUX_FILTER_DISABLE );
return true;
}
return false;
}
......
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