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

Unified Diff: media/formats/mp4/mp4_stream_parser.cc

Issue 254473006: Add media::StreamParser::StreamParameter struct. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/formats/mp2t/mp2t_stream_parser_unittest.cc ('k') | media/formats/mp4/mp4_stream_parser_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/mp4/mp4_stream_parser.cc
diff --git a/media/formats/mp4/mp4_stream_parser.cc b/media/formats/mp4/mp4_stream_parser.cc
index 3136e1931d64435d705316d41f0ac79800cd1814..ccb3cccedee286de3dea2dd919c5ca690dee1337 100644
--- a/media/formats/mp4/mp4_stream_parser.cc
+++ b/media/formats/mp4/mp4_stream_parser.cc
@@ -288,20 +288,18 @@ bool MP4StreamParser::ParseMoov(BoxReader* reader) {
RCHECK(config_cb_.Run(audio_config, video_config, TextTrackConfigMap()));
- base::TimeDelta duration;
+ StreamParser::InitParameters params(kInfiniteDuration());
if (moov_->extends.header.fragment_duration > 0) {
- duration = TimeDeltaFromRational(moov_->extends.header.fragment_duration,
- moov_->header.timescale);
+ params.duration = TimeDeltaFromRational(
+ moov_->extends.header.fragment_duration, moov_->header.timescale);
} else if (moov_->header.duration > 0 &&
moov_->header.duration != kuint64max) {
- duration = TimeDeltaFromRational(moov_->header.duration,
- moov_->header.timescale);
- } else {
- duration = kInfiniteDuration();
+ params.duration =
+ TimeDeltaFromRational(moov_->header.duration, moov_->header.timescale);
}
if (!init_cb_.is_null())
- base::ResetAndReturn(&init_cb_).Run(true, duration, base::Time(), false);
+ base::ResetAndReturn(&init_cb_).Run(true, params);
EmitNeedKeyIfNecessary(moov_->pssh);
return true;
« no previous file with comments | « media/formats/mp2t/mp2t_stream_parser_unittest.cc ('k') | media/formats/mp4/mp4_stream_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698