防止拷贝

This commit is contained in:
xia-chu 2021-05-11 09:09:35 +08:00
parent 7ad361b22d
commit cbafdbabc6

View File

@ -426,7 +426,7 @@ void WebRtcTransportImp::onStartWebRTC() {
ref.rtcp_context_send = std::make_shared<RtcpContext>(ref.plan->sample_rate, false); ref.rtcp_context_send = std::make_shared<RtcpContext>(ref.plan->sample_rate, false);
ref.receiver = std::make_shared<RtpReceiverImp>([&ref, this](RtpPacket::Ptr rtp) { ref.receiver = std::make_shared<RtpReceiverImp>([&ref, this](RtpPacket::Ptr rtp) {
onSortedRtp(ref, std::move(rtp)); onSortedRtp(ref, std::move(rtp));
}, [ref, this](const RtpPacket::Ptr &rtp) { }, [&ref, this](const RtpPacket::Ptr &rtp) {
onBeforeSortedRtp(ref, rtp); onBeforeSortedRtp(ref, rtp);
}); });
} }