Set LoggedIceCandidatePairEvent.transaction_id to default value if missing.

Bug: webrtc:9972
Change-Id: I559ccb6799b494a9013523d3960a725ea7fd448e
Reviewed-on: https://webrtc-review.googlesource.com/c/114240
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Zach Stein <zstein@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26006}
diff --git a/logging/rtc_event_log/rtc_event_log_parser_new.cc b/logging/rtc_event_log/rtc_event_log_parser_new.cc
index b8beff4..79747b0 100644
--- a/logging/rtc_event_log/rtc_event_log_parser_new.cc
+++ b/logging/rtc_event_log/rtc_event_log_parser_new.cc
@@ -1741,6 +1741,8 @@
   res.type = GetRuntimeIceCandidatePairEventType(event.event_type());
   RTC_CHECK(event.has_candidate_pair_id());
   res.candidate_pair_id = event.candidate_pair_id();
+  // transaction_id is not supported by rtclog::Event
+  res.transaction_id = 0;
   return res;
 }
 
@@ -2420,8 +2422,8 @@
   ice_event.candidate_pair_id = proto.candidate_pair_id();
   // TODO(zstein): Make the transaction_id field required once all old versions
   // of the log (which don't have the field) are obsolete.
-  if (proto.has_transaction_id())
-    ice_event.transaction_id = proto.transaction_id();
+  ice_event.transaction_id =
+      proto.has_transaction_id() ? proto.transaction_id() : 0;
 
   ice_candidate_pair_events_.push_back(ice_event);