diff --git a/webrtc/WebRtcTransport.cpp b/webrtc/WebRtcTransport.cpp index 9f9a305a..f06a20be 100644 --- a/webrtc/WebRtcTransport.cpp +++ b/webrtc/WebRtcTransport.cpp @@ -426,7 +426,7 @@ void WebRtcTransportImp::onStartWebRTC() { ref.rtcp_context_send = std::make_shared(ref.plan->sample_rate, false); ref.receiver = std::make_shared([&ref, this](RtpPacket::Ptr rtp) { onSortedRtp(ref, std::move(rtp)); - }, [ref, this](const RtpPacket::Ptr &rtp) { + }, [&ref, this](const RtpPacket::Ptr &rtp) { onBeforeSortedRtp(ref, rtp); }); }