[PCLF] Fix ExampleVideoQualityAnalyzer to not use VideoFrame::kNotSetId as frame id Bug: b/240540204 Change-Id: I7d529f22c93e529a26787dd4c0b5448ad27bb644 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280382 Commit-Queue: Artem Titov <titovartem@webrtc.org> Auto-Submit: Artem Titov <titovartem@webrtc.org> Commit-Queue: Andrey Logvin <landrey@google.com> Reviewed-by: Andrey Logvin <landrey@google.com> Cr-Commit-Position: refs/heads/main@{#38466}
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 f7d4550..da9c53b 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 @@ 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 b12c11b..af4868a 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 @@ // process frame id overlap. std::set<uint16_t> frames_in_flight_ RTC_GUARDED_BY(lock_); std::map<uint16_t, std::string> 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;