| Index: webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
|
| diff --git a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
|
| index 2e510ec897fbb9f8c2c8e1b6b801107b475987a2..b6b463cb398c62d5edeed311d2513220cd35f300 100644
|
| --- a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
|
| +++ b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
|
| @@ -1080,6 +1080,7 @@ int VP8DecoderImpl::InitDecode(const VideoCodec* inst, int number_of_cores) {
|
| }
|
| if (decoder_ == NULL) {
|
| decoder_ = new vpx_codec_ctx_t;
|
| + memset(decoder_, 0, sizeof(*decoder_));
|
| }
|
| if (inst && inst->codecType == kVideoCodecVP8) {
|
| feedback_mode_ = inst->VP8().feedbackModeOn;
|
| @@ -1096,6 +1097,8 @@ int VP8DecoderImpl::InitDecode(const VideoCodec* inst, int number_of_cores) {
|
| #endif
|
|
|
| if (vpx_codec_dec_init(decoder_, vpx_codec_vp8_dx(), &cfg, flags)) {
|
| + delete decoder_;
|
| + decoder_ = nullptr;
|
| return WEBRTC_VIDEO_CODEC_MEMORY;
|
| }
|
|
|
|
|