[vlc-commits] chromecast: autoclean in case of failure

Thomas Guillem git at videolan.org
Thu Feb 1 13:46:22 CET 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Feb  1 13:37:27 2018 +0100| [4b5e0dc65372993c9767afa4c603bdde345b8729] | committer: Thomas Guillem

chromecast: autoclean in case of failure

A method should clean itself in case of failure.

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

 modules/stream_out/chromecast/cast.cpp | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index 67f1c33925..2bcce86419 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -685,7 +685,14 @@ bool sout_stream_sys_t::startSoutChain(sout_stream_t *p_stream,
         else
             ++it;
     }
-    return out_streams.empty() == false;
+
+    if (out_streams.empty())
+    {
+        stopSoutChain( p_stream );
+        access_out_live.clear();
+        return false;
+    }
+    return true;
 }
 
 bool sout_stream_sys_t::UpdateOutput( sout_stream_t *p_stream )
@@ -888,13 +895,8 @@ bool sout_stream_sys_t::UpdateOutput( sout_stream_t *p_stream )
           << ",access=chromecast-http";
 
     if ( !startSoutChain( p_stream, new_streams, ssout.str() ) )
-    {
         p_intf->requestPlayerStop();
 
-        sout_StreamChainDelete( p_out, NULL );
-        access_out_live.clear();
-        p_out = NULL;
-    }
     return true;
 }
 



More information about the vlc-commits mailing list