vlc | branch: master | Francois Cartegnie <fcvlc...@free.fr> | Tue Nov 18 
15:25:37 2014 +0100| [2632d19a1b2b68011806e8d3a2c807f899023485] | committer: 
Francois Cartegnie

stream_filter: dash: don't try to close invalid fd

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

 modules/stream_filter/dash/http/HTTPConnection.cpp |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/stream_filter/dash/http/HTTPConnection.cpp 
b/modules/stream_filter/dash/http/HTTPConnection.cpp
index cc157e4..847ccf6 100644
--- a/modules/stream_filter/dash/http/HTTPConnection.cpp
+++ b/modules/stream_filter/dash/http/HTTPConnection.cpp
@@ -30,6 +30,7 @@
 using namespace dash::http;
 
 HTTPConnection::HTTPConnection  (stream_t *stream) :
+                httpSocket      (-1),
                 stream          (stream),
                 peekBufferLen   (0),
                 contentLength   (0)
@@ -166,7 +167,8 @@ bool            HTTPConnection::sendData        (const 
std::string& data)
 }
 void            HTTPConnection::closeSocket     ()
 {
-    net_Close(this->httpSocket);
+    if (httpSocket >= 0)
+        net_Close(httpSocket);
 }
 bool            HTTPConnection::setUrlRelative  (Chunk *chunk)
 {

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

Reply via email to