From: Pierre Ynard Date: Thu, 28 Jan 2010 22:58:30 +0000 (+0100) Subject: rtp sout: fix DCCP socket leak X-Git-Tag: 1.1.0-ff~735 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=4c04f0b498d66494e976b3d6d2069ce0614b1015;p=vlc rtp sout: fix DCCP socket leak We need to actually delete the sinks for incoming connections... --- diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c index ac146cdcda..b19c02bd55 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 );