1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Revert "Fix #2142, Async release bridger when unpublish. 4.0.60"

This reverts commit 06adb9dc42.
This commit is contained in:
winlin 2021-01-15 13:30:52 +08:00
parent 06adb9dc42
commit ed32965aa4
6 changed files with 5 additions and 60 deletions

View file

@ -43,7 +43,6 @@
#include <srs_protocol_json.hpp>
#include <srs_app_pithy_print.hpp>
#include <srs_app_log.hpp>
#include <srs_app_rtc_server.hpp>
#ifdef SRS_FFMPEG_FIT
#include <srs_app_rtc_codec.hpp>
@ -324,10 +323,8 @@ SrsRtcStream::~SrsRtcStream()
consumers.clear();
srs_freep(req);
srs_freep(bridger_);
srs_freep(stream_desc_);
// Async remove the bridger, to notify the sources to clear it.
_srs_rtc_manager->remove(bridger_);
}
srs_error_t SrsRtcStream::initialize(SrsRequest* r)
@ -486,8 +483,7 @@ void SrsRtcStream::on_unpublish()
// release unpublish stream description.
set_stream_desc(NULL);
// Async remove the bridger, to notify the sources to clear it.
_srs_rtc_manager->remove(bridger_);
srs_freep(bridger_);
// TODO: FIXME: Handle by statistic.
}
@ -721,16 +717,6 @@ srs_error_t SrsRtcFromRtmpBridger::on_audio(SrsSharedPtrMessage* msg)
return err;
}
const SrsContextId& SrsRtcFromRtmpBridger::get_id()
{
return _srs_context->get_id();
}
std::string SrsRtcFromRtmpBridger::desc()
{
return "Rtmp2Rtc";
}
srs_error_t SrsRtcFromRtmpBridger::transcode(char* adts_audio, int nn_adts_audio)
{
srs_error_t err = srs_success;
@ -1189,16 +1175,6 @@ void SrsRtcDummyBridger::on_unpublish()
{
}
const SrsContextId& SrsRtcDummyBridger::get_id()
{
return _srs_context->get_id();
}
std::string SrsRtcDummyBridger::desc()
{
return "Rtmp2RtcDummy";
}
SrsCodecPayload::SrsCodecPayload()
{
pt_of_publisher_ = pt_ = 0;