[vlc-devel] commit: rtp sout: fix DCCP socket leak (Pierre Ynard )

git version control git at videolan.org
Fri Jan 29 00:00:09 CET 2010


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Thu Jan 28 23:58:30 2010 +0100| [4c04f0b498d66494e976b3d6d2069ce0614b1015] | committer: Pierre Ynard 

rtp sout: fix DCCP socket leak

We need to actually delete the sinks for incoming connections...

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4c04f0b498d66494e976b3d6d2069ce0614b1015
---

 modules/stream_out/rtp.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c
index ac146cd..b19c02b 100644
--- a/modules/stream_out/rtp.c
+++ b/modules/stream_out/rtp.c
@@ -1400,14 +1400,16 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )
 
     if( id->rtsp_id )
         RtspDelId( p_sys->rtsp, id->rtsp_id );
-    if( id->sinkc > 0 )
-        rtp_del_sink( id, id->sinkv[0].rtp_fd ); /* sink for explicit dst= */
     if( id->listen.fd != NULL )
     {
         vlc_cancel( id->listen.thread );
         vlc_join( id->listen.thread, NULL );
         net_ListenClose( id->listen.fd );
     }
+    /* Delete remaining sinks (incoming connections or explicit
+     * outgoing dst=) */
+    while( id->sinkc > 0 )
+        rtp_del_sink( id, id->sinkv[0].rtp_fd );
 #ifdef HAVE_SRTP
     if( id->srtp != NULL )
         srtp_destroy( id->srtp );




More information about the vlc-devel mailing list