From b594f4314a23f1a808a4dfe9bf036b45a408fc59 Mon Sep 17 00:00:00 2001 From: "pwestin@webrtc.org" Date: Fri, 9 Mar 2012 12:31:52 +0000 Subject: [PATCH] Fix for set local SSRC Review URL: https://webrtc-codereview.appspot.com/451002 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1868 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/video_engine/vie_channel.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/video_engine/vie_channel.cc b/src/video_engine/vie_channel.cc index 42817a59c..a0f14dc17 100644 --- a/src/video_engine/vie_channel.cc +++ b/src/video_engine/vie_channel.cc @@ -720,6 +720,9 @@ WebRtc_Word32 ViEChannel::SetSSRC(const WebRtc_UWord32 SSRC, if (simulcast_idx == 0) { return rtp_rtcp_.SetSSRC(SSRC); } + if (simulcast_idx > simulcast_rtp_rtcp_.size()) { + return -1; + } std::list::const_iterator it = simulcast_rtp_rtcp_.begin(); for (int i = 1; i < simulcast_idx; ++i, ++it) { if (it == simulcast_rtp_rtcp_.end()) {