From 9d7d75b0fdb805a4e7e5282a70940b6a965333c7 Mon Sep 17 00:00:00 2001 From: philipel Date: Wed, 4 Apr 2018 13:03:01 +0200 Subject: [PATCH] Don't use the |codec_settings| parameter in VP9DecoderImpl::InitDecode. Bug: webrtc:9106 Change-Id: I3d3f38faa0269a01bfb254a9f24839fbcf959463 Reviewed-on: https://webrtc-review.googlesource.com/66741 Reviewed-by: Stefan Holmer Commit-Queue: Philip Eliasson Cr-Commit-Position: refs/heads/master@{#22728} --- modules/video_coding/codecs/vp9/vp9_impl.cc | 11 +---------- modules/video_coding/codecs/vp9/vp9_impl.h | 1 - 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/modules/video_coding/codecs/vp9/vp9_impl.cc b/modules/video_coding/codecs/vp9/vp9_impl.cc index d42a1cc3a2..348a0df233 100644 --- a/modules/video_coding/codecs/vp9/vp9_impl.cc +++ b/modules/video_coding/codecs/vp9/vp9_impl.cc @@ -882,9 +882,7 @@ VP9DecoderImpl::VP9DecoderImpl() : decode_complete_callback_(nullptr), inited_(false), decoder_(nullptr), - key_frame_required_(true) { - memset(&codec_, 0, sizeof(codec_)); -} + key_frame_required_(true) {} VP9DecoderImpl::~VP9DecoderImpl() { inited_ = true; // in order to do the actual release @@ -900,9 +898,6 @@ VP9DecoderImpl::~VP9DecoderImpl() { } int VP9DecoderImpl::InitDecode(const VideoCodec* inst, int number_of_cores) { - if (inst == nullptr) { - return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; - } int ret_val = Release(); if (ret_val < 0) { return ret_val; @@ -918,10 +913,6 @@ int VP9DecoderImpl::InitDecode(const VideoCodec* inst, int number_of_cores) { if (vpx_codec_dec_init(decoder_, vpx_codec_vp9_dx(), &cfg, flags)) { return WEBRTC_VIDEO_CODEC_MEMORY; } - if (&codec_ != inst) { - // Save VideoCodec instance for later; mainly for duplicating the decoder. - codec_ = *inst; - } if (!frame_buffer_pool_.InitializeVpxUsePool(decoder_)) { return WEBRTC_VIDEO_CODEC_MEMORY; diff --git a/modules/video_coding/codecs/vp9/vp9_impl.h b/modules/video_coding/codecs/vp9/vp9_impl.h index cdc8a83169..3f10d262ed 100644 --- a/modules/video_coding/codecs/vp9/vp9_impl.h +++ b/modules/video_coding/codecs/vp9/vp9_impl.h @@ -163,7 +163,6 @@ class VP9DecoderImpl : public VP9Decoder { DecodedImageCallback* decode_complete_callback_; bool inited_; vpx_codec_ctx_t* decoder_; - VideoCodec codec_; bool key_frame_required_; }; } // namespace webrtc