Index: webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc |
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc b/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc |
index e896c65f97269db765d112ce6965b903f4d378bd..15a1d8b1520f094a60611b7469bdf4b2da33fdfe 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc |
+++ b/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc |
@@ -81,7 +81,11 @@ bool ParseStapAStartOffsets(const uint8_t* nalu_ptr, |
RtpPacketizerH264::RtpPacketizerH264(size_t max_payload_len, |
H264PacketizationMode packetization_mode) |
: max_payload_len_(max_payload_len), |
- packetization_mode_(packetization_mode) {} |
+ packetization_mode_(packetization_mode) { |
+ // Guard against uninitialized memory in packetization_mode. |
+ RTC_CHECK(packetization_mode == H264PacketizationMode::NonInterleaved || |
+ packetization_mode == H264PacketizationMode::SingleNalUnit); |
+} |
RtpPacketizerH264::~RtpPacketizerH264() { |
} |