diff --git a/src/channel/rtp_channel/rtp_video_receiver.cpp b/src/channel/rtp_channel/rtp_video_receiver.cpp index 174da7e..05c6249 100644 --- a/src/channel/rtp_channel/rtp_video_receiver.cpp +++ b/src/channel/rtp_channel/rtp_video_receiver.cpp @@ -20,7 +20,7 @@ RtpVideoReceiver::RtpVideoReceiver() [this](int64_t bitrate_bps, std::vector ssrcs) { SendRemb(bitrate_bps, ssrcs); }), - clock_(Clock::GetRealTimeClock()) {} + clock_(Clock::GetRealTimeClockShared()) {} RtpVideoReceiver::RtpVideoReceiver(std::shared_ptr io_statistics) : io_statistics_(io_statistics), @@ -33,7 +33,7 @@ RtpVideoReceiver::RtpVideoReceiver(std::shared_ptr io_statistics) [this](int64_t bitrate_bps, std::vector ssrcs) { SendRemb(bitrate_bps, ssrcs); }), - clock_(Clock::GetRealTimeClock()) { + clock_(Clock::GetRealTimeClockShared()) { rtcp_thread_ = std::thread(&RtpVideoReceiver::RtcpThread, this); #ifdef SAVE_RTP_RECV_STREAM diff --git a/src/qos/clock.cc b/src/qos/clock.cc index fcc89b5..6561789 100644 --- a/src/qos/clock.cc +++ b/src/qos/clock.cc @@ -60,4 +60,8 @@ Clock* Clock::GetRealTimeClock() { static Clock* const clock = new RealTimeClock(); return clock; } + +std::shared_ptr Clock::GetRealTimeClockShared() { + return std::make_shared(); +} } // namespace webrtc \ No newline at end of file diff --git a/src/qos/clock.h b/src/qos/clock.h index c22277b..57f2214 100644 --- a/src/qos/clock.h +++ b/src/qos/clock.h @@ -66,6 +66,7 @@ class Clock { // Returns an instance of the real-time system clock implementation. static Clock* GetRealTimeClock(); + static std::shared_ptr GetRealTimeClockShared(); }; } // namespace webrtc