Chromium Code Reviews| 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; |