]> git.sesse.net Git - vlc/blobdiff - src/stream_output/stream_output.c
Use var_Inherit* instead of var_CreateGet*.
[vlc] / src / stream_output / stream_output.c
index cabc9cdd25032843fb827d7e6088edaa4e59522e..38b2361186cd45feca2e46726b06207fe09b8f52 100644 (file)
@@ -46,6 +46,7 @@
 #include <vlc_meta.h>
 #include <vlc_block.h>
 #include <vlc_codec.h>
+#include <vlc_modules.h>
 
 #include "input/input_interface.h"
 
@@ -812,13 +813,15 @@ static void sout_StreamDelete( sout_stream_t *p_stream )
  */
 void sout_StreamChainDelete(sout_stream_t *p_first, sout_stream_t *p_last)
 {
-    if(!p_first)
-        return;
-
-    if(p_first != p_last)
-        sout_StreamChainDelete(p_first->p_next, p_last);
+    while(p_first != NULL)
+    {
+        sout_stream_t *p_next = p_first->p_next;
 
-    sout_StreamDelete(p_first);
+        sout_StreamDelete(p_first);
+        if(p_first == p_last)
+           break;
+        p_first = p_next;
+    }
 }
 
 /* Create a "stream_out" module, which may forward its ES to p_next module */
@@ -1001,7 +1004,7 @@ rtp:
     if (psz_chain && b_sout_display)
     {
         char *tmp;
-        if (asprintf (&tmp, "duplicate{dst=display,dst=%s}", tmp) == -1)
+        if (asprintf (&tmp, "duplicate{dst=display,dst=%s}", psz_chain) == -1)
             tmp = NULL;
         free (psz_chain);
         psz_chain = tmp;