Fixed bug in SessionMange::get_source_id() method
This commit is contained in:
parent
9d0e721e17
commit
0757318732
@ -178,7 +178,7 @@ void RtspSession::build_response(const std::string& url) {
|
||||
void RtspSession::read_request() {
|
||||
auto self(shared_from_this());
|
||||
if (length_ == max_length) {
|
||||
/* request cannot be consumed and we execeed max length */
|
||||
/* request cannot be consumed and we execeeded max length */
|
||||
stop();
|
||||
} else {
|
||||
socket_.async_read_some(
|
||||
|
@ -415,7 +415,7 @@ static std::array<uint8_t, 6> get_mcast_mac_addr(uint32_t mcast_ip) {
|
||||
|
||||
uint8_t SessionManager::get_source_id(const std::string& name) const {
|
||||
const auto it = source_names_.find(name);
|
||||
return it != source_names_.end() ? it->second : stream_id_max;
|
||||
return it != source_names_.end() ? it->second : (stream_id_max + 1);
|
||||
}
|
||||
|
||||
void SessionManager::on_add_source(const StreamSource& source,
|
||||
|
Loading…
x
Reference in New Issue
Block a user