vlc | branch: master | Hugo Beauzée-Luyssen <h...@beauzee.fr> | Mon Jul 17 
19:02:34 2017 +0200| [dee5abc1c5914b444f904e273a172295f5368b2e] | committer: 
Hugo Beauzée-Luyssen

chromecast: Fix streamId leak

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

 modules/stream_out/chromecast/cast.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/stream_out/chromecast/cast.cpp 
b/modules/stream_out/chromecast/cast.cpp
index f324bc9e8c..47eb291f31 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -218,7 +218,14 @@ bool sout_stream_sys_t::canDecodeAudio( int i_codec ) const
 bool sout_stream_sys_t::startSoutChain( sout_stream_t *p_stream )
 {
     if ( unlikely( p_out != NULL ) )
+    {
+        for ( size_t i = 0; i < streams.size(); i++ )
+        {
+            if ( streams[i]->p_sub_id != NULL )
+                sout_StreamIdDel( p_out, streams[i]->p_sub_id );
+        }
         sout_StreamChainDelete( p_out, NULL );
+    }
 
     msg_Dbg( p_stream, "Creating chain %s", sout.c_str() );
     p_out = sout_StreamChainNew( p_stream->p_sout, sout.c_str(), NULL, NULL);

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to