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

demux: process filters in usual order

There are no obvious reasons to process the demux filter chain in
reverse order. All other chains are processed from upstream to
downstream.

As there was typically only zero or one filter(s), it won´t matter
much for the time being.
parent ca9bb993
......@@ -610,9 +610,6 @@ demux_t *demux_FilterChainNew( demux_t *p_demux, const char *psz_chain )
if(!psz_parser)
return NULL;
vlc_array_t name;
vlc_array_init(&name);
/* parse chain */
while(psz_parser)
{
......@@ -622,22 +619,13 @@ demux_t *demux_FilterChainNew( demux_t *p_demux, const char *psz_chain )
free( psz_parser );
psz_parser = psz_rest_chain;
vlc_array_append(&name, psz_name);
config_ChainDestroy(p_cfg);
}
size_t i = vlc_array_count(&name);
while(i--)
{
char *p_name = vlc_array_item_at_index(&name, i);
demux_t *p_next = demux_FilterNew( p_demux, p_name );
free( p_name );
demux_t *filter = demux_FilterNew(p_demux, psz_name);
if (filter != NULL)
p_demux = filter;
p_demux = p_next;
free(psz_name);
config_ChainDestroy(p_cfg);
}
vlc_array_clear(&name);
return p_demux;
}
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