[fix] fix pacer module crash due to multi-thread

This commit is contained in:
dijunkun
2025-03-21 16:49:43 +08:00
parent 1d41b6499f
commit d17b29dfa4
20 changed files with 131 additions and 83 deletions

View File

@@ -31,7 +31,8 @@ class PacketSenderImp : public PacketSender,
static const int kNoPacketHoldback;
PacketSenderImp(std::shared_ptr<IceAgent> ice_agent,
std::shared_ptr<webrtc::Clock> clock);
std::shared_ptr<webrtc::Clock> clock,
std::shared_ptr<TaskQueue> task_queue);
~PacketSenderImp();
public:
@@ -221,7 +222,7 @@ class PacketSenderImp : public PacketSender,
// Protects against ProcessPackets reentry from packet sent receipts.
bool processing_packets_ = false;
TaskQueue task_queue_;
std::shared_ptr<TaskQueue> task_queue_;
int64_t transport_seq_ = 0;
std::map<int32_t, int16_t> ssrc_seq_;