mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Fix event log visualizer crash when NetEq input creation fails.
This can happen when there are audio SSRCs in the event log without any associated events. Issue was introduced in https://webrtc-review.googlesource.com/c/src/+/300300 Bug: None Change-Id: Ib0e009095bf67633812d937aa5a9e65e2cd8958a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300743 Reviewed-by: Björn Terelius <terelius@webrtc.org> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39806}
This commit is contained in:
parent
aab1bdea11
commit
c2d37895a2
1 changed files with 7 additions and 1 deletions
|
@ -222,6 +222,9 @@ std::unique_ptr<test::NetEqStatsGetter> CreateNetEqTestAndRun(
|
|||
int file_sample_rate_hz) {
|
||||
std::unique_ptr<test::NetEqInput> input =
|
||||
test::CreateNetEqEventLogInput(parsed_log, ssrc);
|
||||
if (!input) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
constexpr int kReplacementPt = 127;
|
||||
std::set<uint8_t> cn_types;
|
||||
|
@ -263,8 +266,11 @@ NetEqStatsGetterMap SimulateNetEq(const ParsedRtcEventLog& parsed_log,
|
|||
int file_sample_rate_hz) {
|
||||
NetEqStatsGetterMap neteq_stats;
|
||||
for (uint32_t ssrc : parsed_log.incoming_audio_ssrcs()) {
|
||||
neteq_stats[ssrc] = CreateNetEqTestAndRun(
|
||||
std::unique_ptr<test::NetEqStatsGetter> stats = CreateNetEqTestAndRun(
|
||||
parsed_log, ssrc, replacement_file_name, file_sample_rate_hz);
|
||||
if (stats) {
|
||||
neteq_stats[ssrc] = std::move(stats);
|
||||
}
|
||||
}
|
||||
return neteq_stats;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue