[vlc-commits] demux: adaptive: fix namespace

Zhao Zhili git at videolan.org
Wed Apr 11 06:43:43 CEST 2018


vlc | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Tue Apr 10 19:30:30 2018 +0800| [870b6dbc47bf94f43f93f8c3e0715bbf879c5b8c] | committer: Francois Cartegnie

demux: adaptive: fix namespace

Signed-off-by: Francois Cartegnie <fcvlcdev at free.fr>

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

 modules/demux/adaptive/tools/Helper.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/demux/adaptive/tools/Helper.cpp b/modules/demux/adaptive/tools/Helper.cpp
index a2a402075c..e0e80dfcaa 100644
--- a/modules/demux/adaptive/tools/Helper.cpp
+++ b/modules/demux/adaptive/tools/Helper.cpp
@@ -70,8 +70,11 @@ std::string Helper::getFileExtension (const std::string &uri)
 
 bool Helper::icaseEquals(std::string str1, std::string str2)
 {
-    transform(str1.begin(), str1.end(), str1.begin(), toupper);
-    transform(str2.begin(), str2.end(), str2.begin(), toupper);
+    if(str1.size() != str2.size())
+        return false;
+
+    std::transform(str1.begin(), str1.end(), str1.begin(), toupper);
+    std::transform(str2.begin(), str2.end(), str2.begin(), toupper);
     return str1 == str2;
 }
 



More information about the vlc-commits mailing list