[vlc-devel] [PATCH 2/2] demux: adaptive: remove redundant check of blank line

Zhao Zhili wantlamy at gmail.com
Tue Jul 18 09:02:33 CEST 2017


1. "\r\n" is already removed by readLine()
2. check "\r\n" but don't check "\n" is inconsistent
---
 modules/demux/adaptive/http/HTTPConnection.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/adaptive/http/HTTPConnection.cpp
b/modules/demux/adaptive/http/HTTPConnection.cpp
index 0ebbd18..ab0fbf5 100644
--- a/modules/demux/adaptive/http/HTTPConnection.cpp
+++ b/modules/demux/adaptive/http/HTTPConnection.cpp
@@ -238,7 +238,7 @@ int HTTPConnection::parseReply()

     line = readLine();

-    while(!line.empty() && line.compare("\r\n"))
+    while(!line.empty())
     {
         size_t split = line.find_first_of(':');
         if(split != std::string::npos)
-- 
2.7.4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170718/3a591175/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-demux-adaptive-remove-redundant-check-of-blank-line.patch
Type: application/octet-stream
Size: 935 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170718/3a591175/attachment.obj>


More information about the vlc-devel mailing list