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

Unified Diff: webrtc/modules/video_coding/codecs/test/videoprocessor.cc

Issue 2514553003: Change rtc::TimeNanos and rtc::TimeMicros return value from uint64_t to int64_t. (Closed)
Patch Set: Drop one more unsigned suffix. Created 4 years, 1 month 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: webrtc/modules/video_coding/codecs/test/videoprocessor.cc
diff --git a/webrtc/modules/video_coding/codecs/test/videoprocessor.cc b/webrtc/modules/video_coding/codecs/test/videoprocessor.cc
index cb7ab75af3c2213b281e25148d54fdb7b59a8380..aab3cbfa5fee1120edda202998359079e141fd85 100644
--- a/webrtc/modules/video_coding/codecs/test/videoprocessor.cc
+++ b/webrtc/modules/video_coding/codecs/test/videoprocessor.cc
@@ -385,9 +385,9 @@ void VideoProcessorImpl::FrameDecoded(const VideoFrame& image) {
int VideoProcessorImpl::GetElapsedTimeMicroseconds(int64_t start,
int64_t stop) {
- uint64_t encode_time = (stop - start) / rtc::kNumNanosecsPerMicrosec;
- RTC_DCHECK_LT(encode_time,
- static_cast<unsigned int>(std::numeric_limits<int>::max()));
+ int64_t encode_time = (stop - start) / rtc::kNumNanosecsPerMicrosec;
+ RTC_DCHECK_GE(encode_time, std::numeric_limits<int>::min());
+ RTC_DCHECK_LE(encode_time, std::numeric_limits<int>::max());
return static_cast<int>(encode_time);
}

Powered by Google App Engine
This is Rietveld 408576698