[vlc-commits] sout: chromecast: close tls connection on error

Francois Cartegnie git at videolan.org
Thu Oct 2 17:37:46 CEST 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Oct  2 17:14:33 2014 +0200| [91d08e51fd0c950633858e3d860c709cb31cd982] | committer: Francois Cartegnie

sout: chromecast: close tls connection on error

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

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

diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index 8303761..2245475 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -325,6 +325,7 @@ static void Close(vlc_object_t *p_this)
         sendMessages(p_stream);
         // ft
     case CHROMECAST_TLS_CONNECTED:
+    case CHROMECAST_CONNECTION_DEAD:
         disconnectChromecast(p_stream);
         p_sys->i_status = CHROMECAST_DISCONNECTED;
         // ft
@@ -388,8 +389,12 @@ static void disconnectChromecast(sout_stream_t *p_stream)
 {
     sout_stream_sys_t *p_sys = p_stream->p_sys;
 
-    vlc_tls_SessionDelete(p_sys->p_tls);
-    vlc_tls_Delete(p_sys->p_creds);
+    if (p_sys->p_tls)
+    {
+        vlc_tls_SessionDelete(p_sys->p_tls);
+        vlc_tls_Delete(p_sys->p_creds);
+        p_sys->p_tls = NULL;
+    }
 }
 
 



More information about the vlc-commits mailing list