From a1aedc0c00a25bbc4e434b11c24893b935f4095a Mon Sep 17 00:00:00 2001 From: Byoungchan Lee Date: Thu, 28 Jul 2022 23:35:34 +0900 Subject: [PATCH] Relax conditions in the PictureIdTest that checks if streams have recreated. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: webrtc:13725 Change-Id: I2bdb5b8f09ec2b0262db661d29febc34ebaaf78b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269680 Commit-Queue: Erik Språng Reviewed-by: Erik Språng Reviewed-by: Ilya Nikolaevskiy Cr-Commit-Position: refs/heads/main@{#37643} --- video/picture_id_tests.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/video/picture_id_tests.cc b/video/picture_id_tests.cc index 6dda450a82..bf6b28aa3e 100644 --- a/video/picture_id_tests.cc +++ b/video/picture_id_tests.cc @@ -135,11 +135,15 @@ class PictureIdObserver : public test::RtpRtcpObserver { // Expect continuously increasing picture id. int diff = ForwardDiff(last.picture_id, current.picture_id); - if (diff > 1) { + EXPECT_LE(diff - 1, max_expected_picture_id_gap_); + if (diff > 2) { // If the VideoSendStream is destroyed, any frames still in queue is lost. - // Gaps only possible for first frame after a recreation, i.e. key frames. + // This can result in a two-frame gap, which will result in logs like + // "packet transmission failed, no matching RTP module found, or + // transmission error". + // A larger gap is only possible for first frame after a recreation, i.e. + // key frames. EXPECT_EQ(VideoFrameType::kVideoFrameKey, current.frame_type); - EXPECT_LE(diff - 1, max_expected_picture_id_gap_); } }