From abc821cd31390dbd81e1c7eb3fe1dc0eafaef54d Mon Sep 17 00:00:00 2001 From: Rasmus Brandt Date: Wed, 25 Apr 2018 10:56:55 +0200 Subject: [PATCH] Allow multiple calls to ProcessFramesAndMaybeVerify with frame writers enabled. Bug: None Change-Id: Ic6e52401ec2db3d0bcaca3605c28763123a4eeb8 Reviewed-on: https://webrtc-review.googlesource.com/72343 Reviewed-by: Sergey Silkin Commit-Queue: Rasmus Brandt Cr-Commit-Position: refs/heads/master@{#23016} --- .../codecs/test/videoprocessor_integrationtest.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc b/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc index 12edc8a0f8..3079ed30f1 100644 --- a/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc +++ b/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc @@ -394,6 +394,8 @@ void VideoProcessorIntegrationTest::SetUpAndInitObjects( config_.NumberOfSimulcastStreams(), config_.NumberOfSpatialLayers()); if (visualization_params) { + RTC_DCHECK(encoded_frame_writers_.empty()); + RTC_DCHECK(decoded_frame_writers_.empty()); for (size_t simulcast_svc_idx = 0; simulcast_svc_idx < num_simulcast_or_spatial_layers; ++simulcast_svc_idx) { @@ -453,9 +455,11 @@ void VideoProcessorIntegrationTest::ReleaseAndCloseObjects( for (auto& encoded_frame_writer : encoded_frame_writers_) { EXPECT_TRUE(encoded_frame_writer->Close()); } + encoded_frame_writers_.clear(); for (auto& decoded_frame_writer : decoded_frame_writers_) { decoded_frame_writer->Close(); } + decoded_frame_writers_.clear(); } void VideoProcessorIntegrationTest::PrintSettings(