Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Unified Diff: webrtc/call/rtp_stream_receiver_controller.cc

Issue 2968693002: SSRC and RSID may only refer to one sink each in RtpDemuxer (Closed)
Patch Set: . Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/call/rtp_stream_receiver_controller.cc
diff --git a/webrtc/call/rtp_stream_receiver_controller.cc b/webrtc/call/rtp_stream_receiver_controller.cc
index a4b1e36ae262c1951479c36b57e07ea71a76041d..2097bacecfe08400a8270e2752fe4f4398941eef 100644
--- a/webrtc/call/rtp_stream_receiver_controller.cc
+++ b/webrtc/call/rtp_stream_receiver_controller.cc
@@ -9,6 +9,8 @@
*/
#include "webrtc/call/rtp_stream_receiver_controller.h"
+
+#include "webrtc/base/logging.h"
#include "webrtc/base/ptr_util.h"
namespace webrtc {
@@ -18,7 +20,11 @@ RtpStreamReceiverController::Receiver::Receiver(
uint32_t ssrc,
RtpPacketSinkInterface* sink)
: controller_(controller), sink_(sink) {
- controller_->AddSink(ssrc, sink_);
+ const bool sink_added = controller_->AddSink(ssrc, sink_);
+ if (!sink_added) {
+ LOG(LS_ERROR) << "RtpStreamReceiverController::Receiver::Receiver: Sink "
+ << "could not be added for SSRC=" << ssrc << ".";
+ }
}
RtpStreamReceiverController::Receiver::~Receiver() {
@@ -43,7 +49,7 @@ bool RtpStreamReceiverController::OnRtpPacket(const RtpPacketReceived& packet) {
return demuxer_.OnRtpPacket(packet);
}
-void RtpStreamReceiverController::AddSink(uint32_t ssrc,
+bool RtpStreamReceiverController::AddSink(uint32_t ssrc,
RtpPacketSinkInterface* sink) {
rtc::CritScope cs(&lock_);
return demuxer_.AddSink(ssrc, sink);

Powered by Google App Engine
This is Rietveld 408576698