H.264 temporal layers w/frame marking (PART 2/3)

Bug: None
Change-Id: Id1381d895377d39c3969635e1a59591214aabb71
Reviewed-on: https://webrtc-review.googlesource.com/c/86140
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26624}
diff --git a/modules/video_coding/encoded_frame.cc b/modules/video_coding/encoded_frame.cc
index c18ef13..6e8e342 100644
--- a/modules/video_coding/encoded_frame.cc
+++ b/modules/video_coding/encoded_frame.cc
@@ -135,6 +135,20 @@
       }
       case kVideoCodecH264: {
         _codecSpecificInfo.codecType = kVideoCodecH264;
+
+        // The following H264 codec specific data are not used elsewhere.
+        // Instead they are read directly from the frame marking extension.
+        // These codec specific data structures should be removed
+        // when frame marking is used.
+        _codecSpecificInfo.codecSpecific.H264.temporal_idx = kNoTemporalIdx;
+        if (header->frame_marking.temporal_id != kNoTemporalIdx) {
+          _codecSpecificInfo.codecSpecific.H264.temporal_idx =
+              header->frame_marking.temporal_id;
+          _codecSpecificInfo.codecSpecific.H264.base_layer_sync =
+              header->frame_marking.base_layer_sync;
+          _codecSpecificInfo.codecSpecific.H264.idr_frame =
+              header->frame_marking.independent_frame;
+        }
         break;
       }
       default: {