Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(685)

Unified Diff: media/cast/test/fake_media_source.cc

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/cast/test/fake_media_source.cc
diff --git a/media/cast/test/fake_media_source.cc b/media/cast/test/fake_media_source.cc
index 24327d030e83f40fa63cdbfc4e3a49fac4c6b16f..3c7a8e0765fe0d8f18572ff8650bfb49ac4484db 100644
--- a/media/cast/test/fake_media_source.cc
+++ b/media/cast/test/fake_media_source.cc
@@ -45,14 +45,13 @@ void AVFreeFrame(AVFrame* frame) {
av_frame_free(&frame);
}
-base::TimeDelta PtsToTimeDelta(int64 pts, const AVRational& time_base) {
+base::TimeDelta PtsToTimeDelta(int64_t pts, const AVRational& time_base) {
return pts * base::TimeDelta::FromSeconds(1) * time_base.num / time_base.den;
}
-int64 TimeDeltaToPts(base::TimeDelta delta, const AVRational& time_base) {
- return static_cast<int64>(
- delta.InSecondsF() * time_base.den / time_base.num +
- 0.5 /* rounding */);
+int64_t TimeDeltaToPts(base::TimeDelta delta, const AVRational& time_base) {
+ return static_cast<int64_t>(
+ delta.InSecondsF() * time_base.den / time_base.num + 0.5 /* rounding */);
}
} // namespace
@@ -542,7 +541,7 @@ void FakeMediaSource::DecodeVideo(ScopedAVPacket packet) {
const AVRational& frame_rate = av_video_stream()->r_frame_rate;
timestamp = last_video_frame_timestamp_ +
(base::TimeDelta::FromSeconds(1) * frame_rate.den / frame_rate.num);
- const int64 adjustment_pts = TimeDeltaToPts(timestamp, time_base);
+ const int64_t adjustment_pts = TimeDeltaToPts(timestamp, time_base);
video_first_pts_ = avframe->pkt_pts - adjustment_pts;
}

Powered by Google App Engine
This is Rietveld 408576698