From 1064679bbabcd01266edadad54a0377ca57c8fd8 Mon Sep 17 00:00:00 2001 From: Guo-wei Shieh Date: Wed, 8 Apr 2015 10:05:39 -0700 Subject: [PATCH] Revert "Fix crash with CVO turned on for VP9 codec" This reverts commit 29b1a1c0c7c6f4b1ae4d63844b1dfaa7a72530a0. TBR=guoweis@webrtc.org BUG= Review URL: https://webrtc-codereview.appspot.com/48929004 Cr-Commit-Position: refs/heads/master@{#8952} --- .../modules/video_coding/main/source/generic_encoder.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; } }