[fix] fix crash due to rtp receivers destroy

This commit is contained in:
dijunkun
2025-02-06 17:08:26 +08:00
parent 1d85247785
commit 3accdf2192
8 changed files with 82 additions and 36 deletions

View File

@@ -12,6 +12,7 @@ RtpVideoSender::RtpVideoSender() {}
RtpVideoSender::RtpVideoSender(std::shared_ptr<IOStatistics> io_statistics)
: io_statistics_(io_statistics) {
SetPeriod(std::chrono::milliseconds(5));
#ifdef SAVE_RTP_SENT_STREAM
file_rtp_sent_ = fopen("rtp_sent_stream.h264", "w+b");
if (!file_rtp_sent_) {
@@ -162,6 +163,5 @@ bool RtpVideoSender::Process() {
rtp_statistics_->UpdateSentBytes(last_send_bytes_);
}
std::this_thread::sleep_for(std::chrono::milliseconds(5));
return true;
}