PCLF: Pass all frames to OnFrameEncoded, even if discarded by SFU

If we don't pass the frames to OnFrameEncoded, we can't see the frames
being sent in the SVC tests. We want to check the frames even if the
SFU would discard them later.

Bug: webrtc:11607
Change-Id: I5b9c6a86c0966047efa7be088f90e83e01f7900b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273350
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38159}
diff --git a/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.cc b/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.cc
index 8488d2e..bc85ebe 100644
--- a/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.cc
+++ b/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.cc
@@ -284,14 +284,10 @@
         delegate_->GetEncoderInfo().implementation_name;
   }
 
-  if (!discard) {
-    // Analyzer should see only encoded images, that weren't discarded. But all
-    // not discarded layers have to be passed.
-    VideoQualityAnalyzerInterface::EncoderStats stats;
-    stats.encoder_name = codec_name;
-    stats.target_encode_bitrate = target_encode_bitrate;
-    analyzer_->OnFrameEncoded(peer_name_, frame_id, encoded_image, stats);
-  }
+  VideoQualityAnalyzerInterface::EncoderStats stats;
+  stats.encoder_name = codec_name;
+  stats.target_encode_bitrate = target_encode_bitrate;
+  analyzer_->OnFrameEncoded(peer_name_, frame_id, encoded_image, stats);
 
   // Image data injector injects frame id and discard flag into provided
   // EncodedImage and returns the image with a) modified original buffer (in