mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Fix memory leak for play stream
This commit is contained in:
parent
069d3ef79d
commit
7ec5ef8497
1 changed files with 14 additions and 0 deletions
|
@ -233,6 +233,20 @@ SrsRtcPlayStream::~SrsRtcPlayStream()
|
||||||
_srs_config->unsubscribe(this);
|
_srs_config->unsubscribe(this);
|
||||||
|
|
||||||
srs_freep(trd);
|
srs_freep(trd);
|
||||||
|
|
||||||
|
if (true) {
|
||||||
|
std::map<uint32_t, SrsRtcAudioSendTrack*>::iterator it;
|
||||||
|
for (it = audio_tracks_.begin(); it != audio_tracks_.end(); ++it) {
|
||||||
|
srs_freep(it->second);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (true) {
|
||||||
|
std::map<uint32_t, SrsRtcVideoSendTrack*>::iterator it;
|
||||||
|
for (it = video_tracks_.begin(); it != video_tracks_.end(); ++it) {
|
||||||
|
srs_freep(it->second);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
srs_error_t SrsRtcPlayStream::initialize(SrsRequest* req, std::map<uint32_t, SrsRtcTrackDescription*> sub_relations)
|
srs_error_t SrsRtcPlayStream::initialize(SrsRequest* req, std::map<uint32_t, SrsRtcTrackDescription*> sub_relations)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue