Fixes coverity warnings.

BUG=
TEST=

Review URL: https://webrtc-codereview.appspot.com/566014

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2262 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
stefan@webrtc.org 2012-05-21 07:42:12 +00:00
parent b3bea2eb3e
commit 1bca6d2437
2 changed files with 5 additions and 7 deletions

View File

@ -20,6 +20,7 @@ namespace test {
RtpFormatVp8TestHelper::RtpFormatVp8TestHelper(const RTPVideoHeaderVP8* hdr)
: payload_data_(NULL),
buffer_(NULL),
data_ptr_(NULL),
fragmentation_(NULL),
hdr_info_(hdr),
sloppy_partitioning_(false),
@ -67,7 +68,7 @@ void RtpFormatVp8TestHelper::GetAllPacketsAndCheck(
int expected_num_packets) {
ASSERT_TRUE(inited_);
int send_bytes = 0;
bool last;
bool last = false;
for (int i = 0; i < expected_num_packets; ++i) {
std::ostringstream ss;
ss << "Checking packet " << i;

View File

@ -79,7 +79,6 @@ int VP8Encoder::Release() {
}
if (raw_ != NULL) {
vpx_img_free(raw_);
delete raw_;
raw_ = NULL;
}
#if WEBRTC_LIBVPX_VERSION >= 971
@ -153,9 +152,6 @@ int VP8Encoder::InitEncode(const VideoCodec* inst,
if (config_ == NULL) {
config_ = new vpx_codec_enc_cfg_t;
}
if (raw_ == NULL) {
raw_ = new vpx_image_t;
}
timestamp_ = 0;
codec_ = *inst;
@ -178,7 +174,7 @@ int VP8Encoder::InitEncode(const VideoCodec* inst,
encoded_image_._buffer = new uint8_t[encoded_image_._size];
encoded_image_._completeFrame = true;
vpx_img_alloc(raw_, IMG_FMT_I420, codec_.width, codec_.height, 32);
raw_ = vpx_img_alloc(NULL, IMG_FMT_I420, codec_.width, codec_.height, 32);
// populate encoder configuration with default values
if (vpx_codec_enc_config_default(vpx_codec_vp8_cx(), config_, 0)) {
return WEBRTC_VIDEO_CODEC_ERROR;
@ -709,7 +705,8 @@ int VP8Decoder::Decode(const EncodedImage& input_image,
propagation_cnt_ = 0;
return WEBRTC_VIDEO_CODEC_ERROR;
}
img = vpx_codec_get_frame(decoder_, &iter);
// We don't render this frame.
vpx_codec_get_frame(decoder_, &iter);
iter = NULL;
}