| Index: media/cast/net/rtp/rtp_parser.cc
|
| diff --git a/media/cast/net/rtp/rtp_parser.cc b/media/cast/net/rtp/rtp_parser.cc
|
| index 9dc0243913db2215f4d172ad6bba2752f7ccce5f..6c8d861ab336b74a1459fb8a892a49c5ea2a535c 100644
|
| --- a/media/cast/net/rtp/rtp_parser.cc
|
| +++ b/media/cast/net/rtp/rtp_parser.cc
|
| @@ -62,13 +62,15 @@ bool RtpParser::ParsePacket(const uint8_t* packet,
|
| header->payload_type = bits & ~kRtpMarkerBitMask;
|
| if (header->payload_type != expected_payload_type_)
|
| return false; // Punt: Unexpected payload type.
|
| + uint32_t truncated_rtp_timestamp;
|
| if (!reader.ReadU16(&header->sequence_number) ||
|
| - !reader.ReadU32(&header->rtp_timestamp) ||
|
| - !reader.ReadU32(&header->sender_ssrc)) {
|
| + !reader.ReadU32(&truncated_rtp_timestamp) ||
|
| + !reader.ReadU32(&header->sender_ssrc) ||
|
| + header->sender_ssrc != expected_sender_ssrc_) {
|
| return false;
|
| }
|
| - if (header->sender_ssrc != expected_sender_ssrc_)
|
| - return false; // Punt: Sender's SSRC does not match the expected one.
|
| + header->rtp_timestamp =
|
| + last_parsed_rtp_timestamp_.Expand(truncated_rtp_timestamp);
|
|
|
| // Parse the Cast header. Note that, from the RTP protocol's perspective, the
|
| // Cast header is part of the payload (and not meant to be an extension
|
| @@ -113,6 +115,8 @@ bool RtpParser::ParsePacket(const uint8_t* packet,
|
| }
|
| }
|
|
|
| + last_parsed_rtp_timestamp_ = header->rtp_timestamp;
|
| +
|
| // Only the lower 8 bits of the |frame_id| were serialized, so do some magic
|
| // to restore the upper 24 bits.
|
| //
|
|
|