Index: media/cast/rtp_timestamp_helper.cc |
diff --git a/media/cast/rtp_timestamp_helper.cc b/media/cast/rtp_timestamp_helper.cc |
index a0c56c09eabdde82e7c6d4e1208813c672fb64ce..3349e7b33fd4adf9d8a176c05984c69801950879 100644 |
--- a/media/cast/rtp_timestamp_helper.cc |
+++ b/media/cast/rtp_timestamp_helper.cc |
@@ -19,9 +19,10 @@ bool RtpTimestampHelper::GetCurrentTimeAsRtpTimestamp( |
const base::TimeTicks& now, uint32* rtp_timestamp) const { |
if (last_capture_time_.is_null()) |
return false; |
- base::TimeDelta elapsed_time = now - last_capture_time_; |
- *rtp_timestamp = last_rtp_timestamp_ + elapsed_time.InMilliseconds() * |
miu
2014/05/23 22:41:28
Not sure whether this was hurting anything, but th
|
- frequency_ / base::Time::kMillisecondsPerSecond; |
+ const base::TimeDelta elapsed_time = now - last_capture_time_; |
+ const int64 rtp_delta = |
+ elapsed_time * frequency_ / base::TimeDelta::FromSeconds(1); |
hubbe
2014/05/23 22:47:34
I think this will wrap around actually...
|
+ *rtp_timestamp = last_rtp_timestamp_ + static_cast<uint32>(rtp_delta); |
return true; |
} |