mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Fix bugs
This commit is contained in:
parent
60aebb5ae3
commit
1c07aed2fc
3 changed files with 11 additions and 11 deletions
|
@ -1450,15 +1450,7 @@ SrsRtcConnection::SrsRtcConnection(SrsRtcServer* s, SrsContextId context_id)
|
|||
SrsRtcConnection::~SrsRtcConnection()
|
||||
{
|
||||
srs_freep(timer_);
|
||||
|
||||
// Note that we should never delete the sendonly_skt,
|
||||
// it's just point to the object in peer_addresses_.
|
||||
map<string, SrsUdpMuxSocket*>::iterator it;
|
||||
for (it = peer_addresses_.begin(); it != peer_addresses_.end(); ++it) {
|
||||
SrsUdpMuxSocket* addr = it->second;
|
||||
srs_freep(addr);
|
||||
}
|
||||
|
||||
|
||||
// Cleanup publishers.
|
||||
for(map<string, SrsRtcPublishStream*>::iterator it = publishers_.begin(); it != publishers_.end(); ++it) {
|
||||
SrsRtcPublishStream* publisher = it->second;
|
||||
|
@ -1475,6 +1467,14 @@ SrsRtcConnection::~SrsRtcConnection()
|
|||
players_.clear();
|
||||
players_ssrc_map_.clear();
|
||||
|
||||
// Note that we should never delete the sendonly_skt,
|
||||
// it's just point to the object in peer_addresses_.
|
||||
map<string, SrsUdpMuxSocket*>::iterator it;
|
||||
for (it = peer_addresses_.begin(); it != peer_addresses_.end(); ++it) {
|
||||
SrsUdpMuxSocket* addr = it->second;
|
||||
srs_freep(addr);
|
||||
}
|
||||
|
||||
srs_freep(transport_);
|
||||
srs_freep(req);
|
||||
srs_freep(stat_);
|
||||
|
|
|
@ -318,7 +318,7 @@ vector<SrsMediaPayloadType> SrsMediaDesc::find_media_with_encoding_name(const st
|
|||
{
|
||||
std::vector<SrsMediaPayloadType> payloads;
|
||||
|
||||
std::string lower_name, upper_name;
|
||||
std::string lower_name(encoding_name), upper_name(encoding_name);
|
||||
transform(encoding_name.begin(), encoding_name.end(), lower_name.begin(), ::tolower);
|
||||
transform(encoding_name.begin(), encoding_name.end(), upper_name.begin(), ::toupper);
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ uint8_t SrsRtcpApp::get_subtype() const
|
|||
|
||||
string SrsRtcpApp::get_name() const
|
||||
{
|
||||
return string((char*)name_);
|
||||
return string((char*)name_, strnlen((char*)name_, 4));
|
||||
}
|
||||
|
||||
srs_error_t SrsRtcpApp::get_payload(uint8_t*& payload, int& len)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue