]> git.sesse.net Git - vlc/commitdiff
* modules/stream_out/rtp.c:
authorSam Hocevar <sam@videolan.org>
Fri, 8 Sep 2006 15:48:21 +0000 (15:48 +0000)
committerSam Hocevar <sam@videolan.org>
Fri, 8 Sep 2006 15:48:21 +0000 (15:48 +0000)
    + Remove SDP file when bailing out. Patch by Fabrice Ollivier.

modules/stream_out/rtp.c

index c54b61564fbeaee68f5f7f77c3d63c8f621f5d8a..0222eb2fd54c913206ee2221fbbd31d44da69013 100644 (file)
@@ -25,6 +25,9 @@
  * Preamble
  *****************************************************************************/
 #include <stdlib.h>
+#ifdef HAVE_UNISTD_H
+#   include <unistd.h>
+#endif
 
 #include <errno.h>
 
@@ -690,6 +693,13 @@ static void Close( vlc_object_t * p_this )
         free( p_sys->psz_sdp );
         p_sys->psz_sdp = NULL;
     }
+    if( p_sys->b_export_sdp_file )
+    {
+#ifdef HAVE_UNISTD_H
+        unlink( p_sys->psz_sdp_file );
+#endif
+        free( p_sys->psz_sdp_file );
+    }
     free( p_sys );
 }