[vlc-commits] chromecast: initialise streams count in proxy

Thomas Guillem git at videolan.org
Wed Jan 31 16:25:51 CET 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jan 31 10:08:23 2018 +0100| [0a9f0a28483ee037124af4387a4227d1d5e1e3a9] | committer: Thomas Guillem

chromecast: initialise streams count in proxy

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

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

diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index f4ea60cd27..30b2c21261 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -290,10 +290,13 @@ static int ProxyControl(sout_stream_t *p_stream, int i_query, va_list args)
 static int ProxyOpen(vlc_object_t *p_this)
 {
     sout_stream_t *p_stream = reinterpret_cast<sout_stream_t*>(p_this);
-    p_stream->p_sys = (sout_stream_sys_t *) var_InheritAddress(p_this, SOUT_CFG_PREFIX "sys");
-    if (p_stream->p_sys == NULL || p_stream->p_next == NULL)
+    sout_stream_sys_t *p_sys = (sout_stream_sys_t *) var_InheritAddress(p_this, SOUT_CFG_PREFIX "sys");
+    if (p_sys == NULL || p_stream->p_next == NULL)
         return VLC_EGENERIC;
 
+    p_stream->p_sys = (sout_stream_sys_t *) p_sys;
+    p_sys->out_streams_added = 0;
+
     p_stream->pf_add     = ProxyAdd;
     p_stream->pf_del     = ProxyDel;
     p_stream->pf_send    = ProxySend;
@@ -619,7 +622,6 @@ bool sout_stream_sys_t::startSoutChain(sout_stream_t *p_stream,
 
     msg_Dbg( p_stream, "Creating chain %s", sout.c_str() );
     cc_has_input = false;
-    out_streams_added = 0;
     out_streams = new_streams;
 
     p_out = sout_StreamChainNew( p_stream->p_sout, sout.c_str(), NULL, NULL);



More information about the vlc-commits mailing list