Fixed bug in SessionMange::get_source_id() method

This commit is contained in:
Andrea Bondavalli 2020-04-24 09:09:40 -07:00
parent 9d0e721e17
commit 0757318732
2 changed files with 2 additions and 2 deletions

View File

@ -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(

View File

@ -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,