Index: webrtc/media/engine/webrtcvideoengine2.cc |
diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc |
index c43dff80d3d140f87334f482df5ae266026c4832..01a1161197f05a27a9338305bb32dee96faadbd1 100644 |
--- a/webrtc/media/engine/webrtcvideoengine2.cc |
+++ b/webrtc/media/engine/webrtcvideoengine2.cc |
@@ -1409,13 +1409,17 @@ void WebRtcVideoChannel2::FillSendAndReceiveCodecStats( |
VideoMediaInfo* video_media_info) { |
for (const VideoCodec& codec : send_params_.codecs) { |
webrtc::RtpCodecParameters codec_params = codec.ToCodecParameters(); |
+ RTC_DCHECK_GE(codec_params.payload_type, 0); |
the sun
2016/11/16 19:41:07
Why are you DCHECKing this property here?
If the
hbos
2016/11/17 14:14:48
Since RtpCodecParameter and the data structure it
|
video_media_info->send_codecs.insert( |
- std::make_pair(codec_params.payload_type, std::move(codec_params))); |
+ std::make_pair(static_cast<uint32_t>(codec_params.payload_type), |
+ std::move(codec_params))); |
} |
for (const VideoCodec& codec : recv_params_.codecs) { |
webrtc::RtpCodecParameters codec_params = codec.ToCodecParameters(); |
+ RTC_DCHECK_GE(codec_params.payload_type, 0); |
video_media_info->receive_codecs.insert( |
- std::make_pair(codec_params.payload_type, std::move(codec_params))); |
+ std::make_pair(static_cast<uint32_t>(codec_params.payload_type), |
+ std::move(codec_params))); |
} |
} |