diff --git a/modules/rtp_rtcp/source/video_rtp_depacketizer_h264.cc b/modules/rtp_rtcp/source/video_rtp_depacketizer_h264.cc index e6b206cdd7..07a9e74d65 100644 --- a/modules/rtp_rtcp/source/video_rtp_depacketizer_h264.cc +++ b/modules/rtp_rtcp/source/video_rtp_depacketizer_h264.cc @@ -221,6 +221,7 @@ absl::optional ProcessStapAOrSingleNalu( } h264_header.nalus.push_back(nalu); + ++h264_header.nalus_length; } return parsed_payload; @@ -279,6 +280,7 @@ absl::optional ParseFuaNalu( h264_header.nalu_type = original_nal_type; if (first_fragment) { h264_header.nalus = {nalu}; + h264_header.nalus_length = 1; } return parsed_payload; } diff --git a/modules/video_coding/codecs/h264/include/h264_globals.h b/modules/video_coding/codecs/h264/include/h264_globals.h index dac36dd734..64a382935e 100644 --- a/modules/video_coding/codecs/h264/include/h264_globals.h +++ b/modules/video_coding/codecs/h264/include/h264_globals.h @@ -83,6 +83,8 @@ struct RTPVideoHeaderH264 { // The packetization type of this buffer - single, aggregated or fragmented. H264PacketizationTypes packetization_type; std::vector nalus; + // TODO - jleconte: Remove 'nalus_length' once all the code has been migrated. + size_t nalus_length; // The packetization mode of this transport. Packetization mode // determines which packetization types are allowed when packetizing. H264PacketizationMode packetization_mode;