Cast: Handle negative TimeTicks correctly in RTCP packet
commit402e5206669870c107b0d6813f09436670572e8e
authorhclam <hclam@chromium.org>
Wed, 21 Jan 2015 14:02:41 +0000 (21 06:02 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 21 Jan 2015 14:03:29 +0000 (21 14:03 +0000)
tree05eb03744691ae58f527a4a6013748d0087b89ca
parent1d47a35e40040daf177f755b1f69cc7fc25c1c9e
Cast: Handle negative TimeTicks correctly in RTCP packet

RRTR in RTCP packets from the receiver contains timing information used
to reject old RTCP packets.

This NTP timestamp is translated to Chrome's internal TimeTicks object.
In the case when sender's NTP time is ahead of the receiver by a large
value, the TimeTicks value can be negative. This caused all RTCP packets
to be rejected.

This change fix this issue and added unit tests to cover this behavior.

BUG=447742

Review URL: https://codereview.chromium.org/860923002

Cr-Commit-Position: refs/heads/master@{#312335}
media/cast/net/rtcp/rtcp.cc
media/cast/net/rtcp/rtcp_unittest.cc