| Index: media/blink/buffered_data_source_host_impl.cc
|
| diff --git a/media/blink/buffered_data_source_host_impl.cc b/media/blink/buffered_data_source_host_impl.cc
|
| index 19d01be2b46135fbf575903f2653d3c6e47b95ae..d3ad3ded4dc5d6455cc365422e23ca69d63e9574 100644
|
| --- a/media/blink/buffered_data_source_host_impl.cc
|
| +++ b/media/blink/buffered_data_source_host_impl.cc
|
| @@ -14,11 +14,12 @@ BufferedDataSourceHostImpl::BufferedDataSourceHostImpl()
|
|
|
| BufferedDataSourceHostImpl::~BufferedDataSourceHostImpl() { }
|
|
|
| -void BufferedDataSourceHostImpl::SetTotalBytes(int64 total_bytes) {
|
| +void BufferedDataSourceHostImpl::SetTotalBytes(int64_t total_bytes) {
|
| total_bytes_ = total_bytes;
|
| }
|
|
|
| -void BufferedDataSourceHostImpl::AddBufferedByteRange(int64 start, int64 end) {
|
| +void BufferedDataSourceHostImpl::AddBufferedByteRange(int64_t start,
|
| + int64_t end) {
|
| const auto i = buffered_byte_ranges_.find(start);
|
| if (i.value() && i.interval_end() >= end) {
|
| // No change
|
| @@ -28,8 +29,9 @@ void BufferedDataSourceHostImpl::AddBufferedByteRange(int64 start, int64 end) {
|
| did_loading_progress_ = true;
|
| }
|
|
|
| -static base::TimeDelta TimeForByteOffset(
|
| - int64 byte_offset, int64 total_bytes, base::TimeDelta duration) {
|
| +static base::TimeDelta TimeForByteOffset(int64_t byte_offset,
|
| + int64_t total_bytes,
|
| + base::TimeDelta duration) {
|
| double position = static_cast<double>(byte_offset) / total_bytes;
|
| // Snap to the beginning/end where the approximation can look especially bad.
|
| if (position < 0.01)
|
| @@ -37,7 +39,7 @@ static base::TimeDelta TimeForByteOffset(
|
| if (position > 0.99)
|
| return duration;
|
| return base::TimeDelta::FromMilliseconds(
|
| - static_cast<int64>(position * duration.InMilliseconds()));
|
| + static_cast<int64_t>(position * duration.InMilliseconds()));
|
| }
|
|
|
| void BufferedDataSourceHostImpl::AddBufferedTimeRanges(
|
| @@ -48,8 +50,8 @@ void BufferedDataSourceHostImpl::AddBufferedTimeRanges(
|
| if (total_bytes_ && !buffered_byte_ranges_.empty()) {
|
| for (const auto i : buffered_byte_ranges_) {
|
| if (i.second) {
|
| - int64 start = i.first.begin;
|
| - int64 end = i.first.end;
|
| + int64_t start = i.first.begin;
|
| + int64_t end = i.first.end;
|
| buffered_time_ranges->Add(
|
| TimeForByteOffset(start, total_bytes_, media_duration),
|
| TimeForByteOffset(end, total_bytes_, media_duration));
|
|
|