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

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

Issue 2368773002: MSE: Recognize "unknown duration" in ISOBMFF mvhd version 0, duration max uint32 case (Closed)
Patch Set: Created 4 years, 3 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
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 60a8e7eb04dd493aa3ca35f578bc5817fdadad35..37af4db35b50f24287fa1203d29ca988a4bcf9fc 100644
--- a/media/formats/mp4/mp4_stream_parser.cc
+++ b/media/formats/mp4/mp4_stream_parser.cc
@@ -421,7 +421,12 @@ bool MP4StreamParser::ParseMoov(BoxReader* reader) {
moov_->extends.header.fragment_duration, moov_->header.timescale);
params.liveness = DemuxerStream::LIVENESS_RECORDED;
} else if (moov_->header.duration > 0 &&
- moov_->header.duration != std::numeric_limits<uint64_t>::max()) {
+ ((moov_->header.version == 0 &&
+ moov_->header.duration !=
+ std::numeric_limits<uint32_t>::max()) ||
+ (moov_->header.version == 1 &&
+ moov_->header.duration !=
+ std::numeric_limits<uint64_t>::max()))) {
xhwang 2016/09/24 06:01:19 Could you please add some comments? This is gettin
wolenetz 2016/09/26 19:35:24 Done.
params.duration =
TimeDeltaFromRational(moov_->header.duration, moov_->header.timescale);
params.liveness = DemuxerStream::LIVENESS_RECORDED;

Powered by Google App Engine
This is Rietveld 408576698