[vlc-commits] chromecast: add assert

Thomas Guillem git at videolan.org
Fri Jan 26 14:27:15 CET 2018


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jan 26 11:07:36 2018 +0100| [c01ed61adcdb92de2b5844f02805d335b74027ff] | committer: Jean-Baptiste Kempf

chromecast: add assert

(cherry picked from commit 5b03a718fd2005fc3ce844520ac772a4a39d689e)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/stream_out/chromecast/cast.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index 4c3aa364d6..5490cf04fc 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -826,8 +826,11 @@ error:
 static void Close(vlc_object_t *p_this)
 {
     sout_stream_t *p_stream = reinterpret_cast<sout_stream_t*>(p_this);
+    sout_stream_sys_t *p_sys = p_stream->p_sys;
 
+    assert(p_sys->out_streams.empty() && p_sys->streams.empty());
     var_Destroy( p_stream->p_sout, SOUT_CFG_PREFIX "sys" );
-    delete p_stream->p_sys;
+
+    delete p_sys;
 }
 



More information about the vlc-commits mailing list