From 8fc663b3ae65ab9a3daac7c75fbef605837c578e Mon Sep 17 00:00:00 2001 From: "mflodman@webrtc.org" Date: Wed, 26 Oct 2011 11:30:52 +0000 Subject: [PATCH] Don't trigger false ViE SetReceiveCodec warning. Review URL: http://webrtc-codereview.appspot.com/250001 git-svn-id: http://webrtc.googlecode.com/svn/trunk@820 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/video_engine/main/source/vie_channel.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/video_engine/main/source/vie_channel.cc b/src/video_engine/main/source/vie_channel.cc index 118e84083..75755eaf4 100644 --- a/src/video_engine/main/source/vie_channel.cc +++ b/src/video_engine/main/source/vie_channel.cc @@ -533,9 +533,13 @@ WebRtc_Word32 ViEChannel::SetReceiveCodec(const VideoCodec& videoCodec) WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(_engineId, _channelId), "%s", __FUNCTION__); - _rtpRtcp.DeRegisterReceivePayload(videoCodec.plType); - if (_rtpRtcp.RegisterReceivePayload(videoCodec) - != 0) + WebRtc_Word8 old_pltype = -1; + if (_rtpRtcp.ReceivePayloadType(videoCodec, &old_pltype) != -1) + { + _rtpRtcp.DeRegisterReceivePayload(old_pltype); + } + + if (_rtpRtcp.RegisterReceivePayload(videoCodec) != 0) { WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideo, ViEId(_engineId, _channelId),