OnLossNotification() receives references
A typo in a previous CL made OnLossNotification() accept its
single argument as a const-value, rather than a const-reference.
Bug: webrtc:10501
Change-Id: I5e6f9c79f15205b75ec90a53d3fccf3dd9927e33
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133343
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27659}
diff --git a/api/video_codecs/vp8_frame_buffer_controller.h b/api/video_codecs/vp8_frame_buffer_controller.h
index c506fa4..f3d2b1a 100644
--- a/api/video_codecs/vp8_frame_buffer_controller.h
+++ b/api/video_codecs/vp8_frame_buffer_controller.h
@@ -140,7 +140,7 @@
// Called when a loss notification is received.
virtual void OnLossNotification(
- const VideoEncoder::LossNotification loss_notification) = 0;
+ const VideoEncoder::LossNotification& loss_notification) = 0;
};
// Interface for a factory of Vp8FrameBufferController instances.
diff --git a/api/video_codecs/vp8_temporal_layers.cc b/api/video_codecs/vp8_temporal_layers.cc
index 004b10f..7a9cf37 100644
--- a/api/video_codecs/vp8_temporal_layers.cc
+++ b/api/video_codecs/vp8_temporal_layers.cc
@@ -89,7 +89,7 @@
}
void Vp8TemporalLayers::OnLossNotification(
- const VideoEncoder::LossNotification loss_notification) {
+ const VideoEncoder::LossNotification& loss_notification) {
for (auto& controller : controllers_) {
controller->OnLossNotification(loss_notification);
}
diff --git a/api/video_codecs/vp8_temporal_layers.h b/api/video_codecs/vp8_temporal_layers.h
index dcf04c6..f02d288 100644
--- a/api/video_codecs/vp8_temporal_layers.h
+++ b/api/video_codecs/vp8_temporal_layers.h
@@ -62,7 +62,7 @@
void OnRttUpdate(int64_t rtt_ms) override;
void OnLossNotification(
- const VideoEncoder::LossNotification loss_notification) override;
+ const VideoEncoder::LossNotification& loss_notification) override;
private:
std::vector<std::unique_ptr<Vp8FrameBufferController>> controllers_;