diff --git a/trunk/src/app/srs_app_rtc_conn.cpp b/trunk/src/app/srs_app_rtc_conn.cpp index c523c3d24..c737bf774 100644 --- a/trunk/src/app/srs_app_rtc_conn.cpp +++ b/trunk/src/app/srs_app_rtc_conn.cpp @@ -233,6 +233,20 @@ SrsRtcPlayStream::~SrsRtcPlayStream() _srs_config->unsubscribe(this); srs_freep(trd); + + if (true) { + std::map::iterator it; + for (it = audio_tracks_.begin(); it != audio_tracks_.end(); ++it) { + srs_freep(it->second); + } + } + + if (true) { + std::map::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 sub_relations)