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

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


vlc/vlc-1.0 | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Fri Jan 29 00:23:47 2010 +0100| [adf7726e1c2137ad9faf9d6afd9d973ba65b07f9] | committer: Pierre Ynard 

rtp sout: fix DCCP socket leak

We need to actually delete the sinks for incoming connections...
(cherry picked from commit 4c04f0b498d66494e976b3d6d2069ce0614b1015)

Conflicts:

	modules/stream_out/rtp.c

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

 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 036b993..e37b083 100644
--- a/modules/stream_out/rtp.c
+++ b/modules/stream_out/rtp.c
@@ -1330,10 +1330,12 @@ 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 )
         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 );
     if( id->srtp != NULL )
         srtp_destroy( id->srtp );
 




More information about the vlc-devel mailing list