[vlc-commits] demux: adaptive: close when read contentlength
Francois Cartegnie
git at videolan.org
Thu Feb 25 23:00:45 CET 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Feb 25 15:33:19 2016 +0100| [874a409499639af8068458e4d8f22ff3202ff074] | committer: Francois Cartegnie
demux: adaptive: close when read contentlength
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=874a409499639af8068458e4d8f22ff3202ff074
---
modules/demux/adaptive/http/HTTPConnection.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/demux/adaptive/http/HTTPConnection.cpp b/modules/demux/adaptive/http/HTTPConnection.cpp
index 8342ea4..63fd5a0 100644
--- a/modules/demux/adaptive/http/HTTPConnection.cpp
+++ b/modules/demux/adaptive/http/HTTPConnection.cpp
@@ -173,7 +173,8 @@ ssize_t HTTPConnection::read(void *p_buffer, size_t len)
if(ret >= 0)
bytesRead += ret;
- if(ret < 0 || (size_t)ret < len) /* set EOF */
+ if(ret < 0 || (size_t)ret < len || /* set EOF */
+ contentLength == bytesRead )
{
socket->disconnect();
return ret;
More information about the vlc-commits
mailing list