From 39be828c846a6a6c01164158243207ad6efbf955 Mon Sep 17 00:00:00 2001 From: Taylor Brandstetter Date: Thu, 5 Mar 2020 14:23:21 -0800 Subject: [PATCH] Add commas between codec parameters in VideoReceiveStream logging. Meaning you'll see "{foo: 1, bar: 2}" instead of "{foo: 1bar: 2}". Bug: None Change-Id: I7494ad9ac154c4280036c9ff6cbd0466e2a2e2d5 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/78580 Reviewed-by: Stefan Holmer Commit-Queue: Taylor Cr-Commit-Position: refs/heads/master@{#30717} --- call/video_receive_stream.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/call/video_receive_stream.cc b/call/video_receive_stream.cc index c4895e465a..e0f3de366b 100644 --- a/call/video_receive_stream.cc +++ b/call/video_receive_stream.cc @@ -24,8 +24,13 @@ std::string VideoReceiveStream::Decoder::ToString() const { ss << "{payload_type: " << payload_type; ss << ", payload_name: " << video_format.name; ss << ", codec_params: {"; - for (const auto& it : video_format.parameters) - ss << it.first << ": " << it.second; + for (auto it = video_format.parameters.begin(); + it != video_format.parameters.end(); ++it) { + if (it != video_format.parameters.begin()) { + ss << ", "; + } + ss << it->first << ": " << it->second; + } ss << '}'; ss << '}';