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

sout_StreamChainDelete: iterative implementation

parent f9db0ea1
...@@ -812,14 +812,15 @@ static void sout_StreamDelete( sout_stream_t *p_stream ) ...@@ -812,14 +812,15 @@ static void sout_StreamDelete( sout_stream_t *p_stream )
*/ */
void sout_StreamChainDelete(sout_stream_t *p_first, sout_stream_t *p_last) void sout_StreamChainDelete(sout_stream_t *p_first, sout_stream_t *p_last)
{ {
if(!p_first) while(p_first != NULL)
return; {
sout_stream_t *p_next = p_first->p_next;
sout_stream_t *p_next = p_first->p_next;
sout_StreamDelete(p_first); sout_StreamDelete(p_first);
if(p_first != p_last) if(p_first == p_last)
sout_StreamChainDelete(p_next, p_last); break;
p_first = p_next;
}
} }
/* Create a "stream_out" module, which may forward its ES to p_next module */ /* Create a "stream_out" module, which may forward its ES to p_next module */
......
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