Add a RunLoop to RtpReplayer to fix fuzzers

Bug: chromium:1080852
Change-Id: Ia02511cde09994deee222e4f1267d5265d0364ca
Tbr: mbonadei@webrtc.org
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174756
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31196}
This commit is contained in:
Tommi 2020-05-09 07:49:08 +02:00 committed by Commit Bot
parent fc11519c92
commit 3580706684
2 changed files with 3 additions and 0 deletions

View File

@ -36,6 +36,7 @@ rtc_library("rtp_replayer") {
"../../../test:rtp_test_utils",
"../../../test:run_test",
"../../../test:run_test_interface",
"../../../test:test_common",
"../../../test:test_renderer",
"../../../test:test_support",
"../../../test:video_test_common",

View File

@ -24,6 +24,7 @@
#include "test/fake_decoder.h"
#include "test/rtp_file_reader.h"
#include "test/rtp_header_parser.h"
#include "test/run_loop.h"
namespace webrtc {
namespace test {
@ -43,6 +44,7 @@ void RtpReplayer::Replay(
std::vector<VideoReceiveStream::Config> receive_stream_configs,
const uint8_t* rtp_dump_data,
size_t rtp_dump_size) {
RunLoop loop;
rtc::ScopedBaseFakeClock fake_clock;
// Work around: webrtc calls webrtc::Random(clock.TimeInMicroseconds())