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

Unified Diff: media/formats/webm/webm_info_parser.cc

Issue 2090323002: Make callers of FromUTC(Local)Exploded in media/ use new time API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 6 months 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
« no previous file with comments | « media/ffmpeg/ffmpeg_common.cc ('k') | media/test/pipeline_integration_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/webm/webm_info_parser.cc
diff --git a/media/formats/webm/webm_info_parser.cc b/media/formats/webm/webm_info_parser.cc
index be6d70883878387ad016ef09cb6c35ed5bf0c6e6..6cce65b49eb71b9a0b0f2827f8bd437fe571ea8e 100644
--- a/media/formats/webm/webm_info_parser.cc
+++ b/media/formats/webm/webm_info_parser.cc
@@ -90,8 +90,11 @@ bool WebMInfoParser::OnBinary(int id, const uint8_t* data, int size) {
exploded_epoch.minute = 0;
exploded_epoch.second = 0;
exploded_epoch.millisecond = 0;
- date_utc_ = base::Time::FromUTCExploded(exploded_epoch) +
- base::TimeDelta::FromMicroseconds(date_in_nanoseconds / 1000);
+ base::Time out_time;
+ if (!base::Time::FromUTCExploded(exploded_epoch, &out_time))
+ return false;
+ date_utc_ = out_time +
+ base::TimeDelta::FromMicroseconds(date_in_nanoseconds / 1000);
}
return true;
}
« no previous file with comments | « media/ffmpeg/ffmpeg_common.cc ('k') | media/test/pipeline_integration_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698