Index: webrtc/modules/video_coding/codecs/test/videoprocessor.cc |
diff --git a/webrtc/modules/video_coding/codecs/test/videoprocessor.cc b/webrtc/modules/video_coding/codecs/test/videoprocessor.cc |
index ba7a3403ab8bc623e9ac5d26066f029afa3ac48b..81e0488407b43ed678161feadbf3c4bbfe65b15b 100644 |
--- a/webrtc/modules/video_coding/codecs/test/videoprocessor.cc |
+++ b/webrtc/modules/video_coding/codecs/test/videoprocessor.cc |
@@ -138,10 +138,7 @@ VideoProcessor::VideoProcessor(webrtc::VideoEncoder* encoder, |
frame_infos_.reserve(analysis_frame_reader->NumberOfFrames()); |
} |
-VideoProcessor::~VideoProcessor() { |
- encoder_->RegisterEncodeCompleteCallback(nullptr); |
- decoder_->RegisterDecodeCompleteCallback(nullptr); |
-} |
+VideoProcessor::~VideoProcessor() = default; |
void VideoProcessor::Init() { |
RTC_DCHECK(!initialized_) << "VideoProcessor already initialized."; |
@@ -189,6 +186,16 @@ void VideoProcessor::Init() { |
} |
} |
+void VideoProcessor::Release() { |
+ encoder_->RegisterEncodeCompleteCallback(nullptr); |
+ decoder_->RegisterDecodeCompleteCallback(nullptr); |
+ |
+ RTC_CHECK_EQ(encoder_->Release(), WEBRTC_VIDEO_CODEC_OK); |
+ RTC_CHECK_EQ(decoder_->Release(), WEBRTC_VIDEO_CODEC_OK); |
+ |
+ initialized_ = false; |
+} |
+ |
bool VideoProcessor::ProcessFrame(int frame_number) { |
RTC_DCHECK_GE(frame_number, 0); |
RTC_DCHECK_LE(frame_number, frame_infos_.size()) |