diff options
author | fgalligan@chromium.org <fgalligan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-03 20:03:49 +0000 |
---|---|---|
committer | fgalligan@chromium.org <fgalligan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-03 20:03:49 +0000 |
commit | 45ac3481cda60308972f14f89deb02761f34f420 (patch) | |
tree | 24fd38d5e202108109d8fa17c82a4595921da8b1 /media | |
parent | 8a860514080c34b6ebfdab2f4826c60a30e6a468 (diff) | |
download | chromium_src-45ac3481cda60308972f14f89deb02761f34f420.zip chromium_src-45ac3481cda60308972f14f89deb02761f34f420.tar.gz chromium_src-45ac3481cda60308972f14f89deb02761f34f420.tar.bz2 |
Follow up CL to 6990065
Follow up CL to http://codereview.chromium.org/6990065/
BUG=75458
TEST=Open file out29367209.webm from Bug#75458 and video playback
should be more than one frame.
Review URL: http://codereview.chromium.org/7058020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87839 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/filters/adaptive_demuxer.cc | 8 | ||||
-rw-r--r-- | media/filters/ffmpeg_demuxer.cc | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/media/filters/adaptive_demuxer.cc b/media/filters/adaptive_demuxer.cc index bbc022a..8f5750d 100644 --- a/media/filters/adaptive_demuxer.cc +++ b/media/filters/adaptive_demuxer.cc @@ -458,7 +458,7 @@ AdaptiveDemuxer::AdaptiveDemuxer(DemuxerVector const& demuxers, current_video_demuxer_index_(initial_video_demuxer_index), playback_rate_(0), switch_pending_(false), - start_time_(base::TimeDelta::FromMicroseconds(kint64max)) { + start_time_(kNoTimestamp) { DCHECK(!demuxers_.empty()); DCHECK_GE(current_audio_demuxer_index_, -1); DCHECK_GE(current_video_demuxer_index_, -1); @@ -474,8 +474,12 @@ AdaptiveDemuxer::AdaptiveDemuxer(DemuxerVector const& demuxers, video_streams.push_back(video); if (video) video_ids.push_back(i); - start_time_ = std::min(start_time_, demuxers_[i]->GetStartTime()); + if (start_time_ == kNoTimestamp || + demuxers_[i]->GetStartTime() < start_time_) { + start_time_ = demuxers_[i]->GetStartTime(); + } } + DCHECK(start_time_ != kNoTimestamp); // TODO(fgalligan): Add a check to make sure |demuxers_| start time are // within an acceptable range, once the range is defined. if (current_audio_demuxer_index_ >= 0) { diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc index fe259fd..5bf47a7 100644 --- a/media/filters/ffmpeg_demuxer.cc +++ b/media/filters/ffmpeg_demuxer.cc @@ -534,6 +534,8 @@ void FFmpegDemuxer::InitializeTask(DataSource* data_source, Limits::kMaxTimeInMicroseconds); } + // Some demuxers, like WAV, do not put timestamps on their frames. We + // assume the the start time is 0. if (start_time_ == kNoTimestamp) start_time_ = base::TimeDelta(); |