diff --git a/webrtc/modules/video_coding/main/source/generic_encoder.cc b/webrtc/modules/video_coding/main/source/generic_encoder.cc index 17ee4d66b0..0cc2ec4e8d 100644 --- a/webrtc/modules/video_coding/main/source/generic_encoder.cc +++ b/webrtc/modules/video_coding/main/source/generic_encoder.cc @@ -8,7 +8,6 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "webrtc/base/checks.h" #include "webrtc/engine_configurations.h" #include "webrtc/modules/video_coding/main/source/encoded_frame.h" #include "webrtc/modules/video_coding/main/source/generic_encoder.h" @@ -21,7 +20,10 @@ namespace { // Map information from info into rtp. If no relevant information is found // in info, rtp is set to NULL. void CopyCodecSpecific(const CodecSpecificInfo* info, RTPVideoHeader** rtp) { - DCHECK(info); + if (!info) { + *rtp = NULL; + return; + } switch (info->codecType) { case kVideoCodecVP8: { (*rtp)->codec = kRtpVideoVp8; @@ -44,6 +46,8 @@ void CopyCodecSpecific(const CodecSpecificInfo* info, RTPVideoHeader** rtp) { (*rtp)->simulcastIdx = info->codecSpecific.generic.simulcast_idx; return; default: + // No codec specific info. Change RTP header pointer to NULL. + *rtp = NULL; return; } }