Fix fail to get Sources in RTSP. the string msg although initially reserved to ZM_NETWORK_BUFSIZ, after use it's capacity is changed whatever it's contents are. So need to re-reserve.
This commit is contained in:
parent
ae17b2316e
commit
988f118ba9
|
@ -244,6 +244,7 @@ class Socket : public CommsBase {
|
|||
}
|
||||
|
||||
virtual ssize_t recv(std::string &msg) const {
|
||||
msg.reserve(ZM_NETWORK_BUFSIZ);
|
||||
std::vector<char> buffer(msg.capacity());
|
||||
ssize_t nBytes;
|
||||
if ((nBytes = ::recv(mSd, buffer.data(), buffer.size(), 0)) < 0) {
|
||||
|
|
Loading…
Reference in New Issue