diff --git a/test/pc/e2e/analyzer/video/example_video_quality_analyzer.cc b/test/pc/e2e/analyzer/video/example_video_quality_analyzer.cc index f7d4550b0b..da9c53beb9 100644 --- a/test/pc/e2e/analyzer/video/example_video_quality_analyzer.cc +++ b/test/pc/e2e/analyzer/video/example_video_quality_analyzer.cc @@ -29,6 +29,9 @@ uint16_t ExampleVideoQualityAnalyzer::OnFrameCaptured( const webrtc::VideoFrame& frame) { MutexLock lock(&lock_); uint16_t frame_id = next_frame_id_++; + if (frame_id == VideoFrame::kNotSetId) { + frame_id = next_frame_id_++; + } auto it = frames_in_flight_.find(frame_id); if (it == frames_in_flight_.end()) { frames_in_flight_.insert(frame_id); diff --git a/test/pc/e2e/analyzer/video/example_video_quality_analyzer.h b/test/pc/e2e/analyzer/video/example_video_quality_analyzer.h index b12c11ba7c..af4868a961 100644 --- a/test/pc/e2e/analyzer/video/example_video_quality_analyzer.h +++ b/test/pc/e2e/analyzer/video/example_video_quality_analyzer.h @@ -86,7 +86,7 @@ class ExampleVideoQualityAnalyzer : public VideoQualityAnalyzerInterface { // process frame id overlap. std::set frames_in_flight_ RTC_GUARDED_BY(lock_); std::map frames_to_stream_label_ RTC_GUARDED_BY(lock_); - uint16_t next_frame_id_ RTC_GUARDED_BY(lock_) = 0; + uint16_t next_frame_id_ RTC_GUARDED_BY(lock_) = 1; uint64_t frames_captured_ RTC_GUARDED_BY(lock_) = 0; uint64_t frames_pre_encoded_ RTC_GUARDED_BY(lock_) = 0; uint64_t frames_encoded_ RTC_GUARDED_BY(lock_) = 0;