diff --git a/modules/audio_coding/neteq/tools/neteq_test.cc b/modules/audio_coding/neteq/tools/neteq_test.cc index a263a73721..7e2093de0e 100644 --- a/modules/audio_coding/neteq/tools/neteq_test.cc +++ b/modules/audio_coding/neteq/tools/neteq_test.cc @@ -267,8 +267,12 @@ NetEqTest::SimulationStepResult NetEqTest::RunToNextGetAudio() { prev_lifetime_stats_ = lifetime_stats; const bool no_more_packets_to_decode = !input_->NextPacketTime() && !operations_state.next_packet_available; - result.is_simulation_finished = - no_more_packets_to_decode || input_->ended(); + // End the simulation if the gap is too large. This indicates an issue + // with the event log file. + const bool simulation_step_too_large = result.simulation_step_ms > 1000; + result.is_simulation_finished = simulation_step_too_large || + no_more_packets_to_decode || + input_->ended(); prev_ops_state_ = operations_state; return result; } diff --git a/modules/audio_coding/neteq/tools/rtc_event_log_source.cc b/modules/audio_coding/neteq/tools/rtc_event_log_source.cc index 789cc52f76..4719922b98 100644 --- a/modules/audio_coding/neteq/tools/rtc_event_log_source.cc +++ b/modules/audio_coding/neteq/tools/rtc_event_log_source.cc @@ -138,6 +138,11 @@ bool RtcEventLogSource::Initialize(const ParsedRtcEventLog& parsed_log, continue; } event_processor.AddEvents(rtp_packets.incoming_packets, handle_rtp_packet); + // If no SSRC filter has been set, use the first SSRC only. The simulator + // does not work properly with interleaved packets from multiple SSRCs. + if (!ssrc_filter.has_value()) { + ssrc_filter = rtp_packets.ssrc; + } } for (const auto& audio_playouts : parsed_log.audio_playout_events()) {