From 5c8914e109280979725abbdb4e3624dd9af115b9 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sat, 4 Aug 2018 23:59:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ZLToolKit | 2 +- src/Rtsp/Rtsp.h | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ZLToolKit b/ZLToolKit index e4b5f7f0..9e0819d3 160000 --- a/ZLToolKit +++ b/ZLToolKit @@ -1 +1 @@ -Subproject commit e4b5f7f0495d338fd03924850a45a16a797c4673 +Subproject commit 9e0819d36e1f8b85fbd12d6c6c2286178ea96b91 diff --git a/src/Rtsp/Rtsp.h b/src/Rtsp/Rtsp.h index 31f29d51..b99cedbe 100644 --- a/src/Rtsp/Rtsp.h +++ b/src/Rtsp/Rtsp.h @@ -174,15 +174,13 @@ public: return m_mapUrlArgs; } - static StrCaseMap parseArgs(const string &str,const char *pair_delim = "&", const char *key_delim = "="){ StrCaseMap ret; auto arg_vec = split(str, pair_delim); for (string &key_val : arg_vec) { - auto key_val_vec = split(key_val, key_delim); - if (key_val_vec.size() >= 2) { - ret[key_val_vec[0]] = key_val_vec[1]; - } + auto key = FindField(key_val.data(),NULL,key_delim); + auto val = FindField(key_val.data(),key_delim, NULL); + ret[key] = val; } return ret; }