From ae499a2ac80b5b17bcb9f00f594f836db7d6bbd0 Mon Sep 17 00:00:00 2001 From: "mflodman@webrtc.org" Date: Thu, 20 Oct 2011 05:55:46 +0000 Subject: [PATCH] Set correct codec info before sending frame to VCM. Review URL: http://webrtc-codereview.appspot.com/240003 git-svn-id: http://webrtc.googlecode.com/svn/trunk@780 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/video_engine/main/source/vie_encoder.cc | 25 ++++++++++----------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/video_engine/main/source/vie_encoder.cc b/src/video_engine/main/source/vie_encoder.cc index 64f4fc8ca7..4ce754f61d 100644 --- a/src/video_engine/main/source/vie_encoder.cc +++ b/src/video_engine/main/source/vie_encoder.cc @@ -549,23 +549,22 @@ void ViEEncoder::DeliverFrame(int id, webrtc::VideoFrame& videoFrame, if (_vcm.SendCodec() == webrtc::kVideoCodecVP8) { webrtc::CodecSpecificInfo codecSpecificInfo; - codecSpecificInfo.codecType = webrtc::kVideoCodecUnknown; + codecSpecificInfo.codecType = webrtc::kVideoCodecVP8; if (_hasReceivedSLI || _hasReceivedRPSI) { - webrtc::VideoCodec currentSendCodec; - _vcm.SendCodec(¤tSendCodec); - if (currentSendCodec.codecType == webrtc::kVideoCodecVP8) - { - codecSpecificInfo.codecType = webrtc::kVideoCodecVP8; - codecSpecificInfo.codecSpecific.VP8.hasReceivedRPSI = _hasReceivedRPSI; - codecSpecificInfo.codecSpecific.VP8.hasReceivedSLI = _hasReceivedSLI; - codecSpecificInfo.codecSpecific.VP8.pictureIdRPSI = _pictureIdRPSI; - codecSpecificInfo.codecSpecific.VP8.pictureIdSLI = _pictureIdSLI; + { + codecSpecificInfo.codecSpecific.VP8.hasReceivedRPSI = + _hasReceivedRPSI; + codecSpecificInfo.codecSpecific.VP8.hasReceivedSLI = + _hasReceivedSLI; + codecSpecificInfo.codecSpecific.VP8.pictureIdRPSI = + _pictureIdRPSI; + codecSpecificInfo.codecSpecific.VP8.pictureIdSLI = + _pictureIdSLI; } - _hasReceivedSLI = false; - _hasReceivedRPSI = false; + _hasReceivedSLI = false; + _hasReceivedRPSI = false; } - // Pass frame via preprocessor VideoFrame *decimatedFrame = NULL; const int ret = _vpm.PreprocessFrame(&videoFrame, &decimatedFrame); if (ret == 1)