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

Unified Diff: media/filters/ffmpeg_demuxer.cc

Issue 8786013: Replace media::Limits struct with media::limits namespace and update documentation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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/filters/ffmpeg_demuxer.cc
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index e33bada6f1b74043169fdedf0510b91856949267..08476ba43ed457fbb1cef214ad24206bbe6dbe58 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -522,7 +522,7 @@ void FFmpegDemuxer::InitializeTask(DataSource* data_source,
// The duration is not a valid value. Assume that this is a live stream
// and set duration to the maximum int64 number to represent infinity.
Ami GONE FROM CHROMIUM 2011/12/03 02:11:38 This is crazy. If we want \infty we should define
scherkus (not reviewing) 2011/12/06 02:05:57 That makes sense for durations, but if we're going
max_duration = base::TimeDelta::FromMicroseconds(
- Limits::kMaxTimeInMicroseconds);
+ limits::kMaxTimeInMicroseconds);
}
// Some demuxers, like WAV, do not put timestamps on their frames. We
@@ -562,7 +562,7 @@ int FFmpegDemuxer::GetBitrate() {
// If there isn't a bitrate set in the container or streams, but there is a
// valid duration, approximate the bitrate using the duration.
if (max_duration_.InMilliseconds() > 0 &&
- max_duration_.InMicroseconds() < Limits::kMaxTimeInMicroseconds) {
+ max_duration_.InMicroseconds() < limits::kMaxTimeInMicroseconds) {
Ami GONE FROM CHROMIUM 2011/12/03 02:11:38 This would be a lot clearer as != kInfinity IMO.
scherkus (not reviewing) 2011/12/06 02:05:57 Done.
int64 filesize_in_bytes;
if (GetSize(&filesize_in_bytes))
return 8000 * filesize_in_bytes / max_duration_.InMilliseconds();
Ami GONE FROM CHROMIUM 2011/12/03 02:11:38 This can SIGFPE b/c the >0 check is done in micros
scherkus (not reviewing) 2011/12/06 02:05:57 Done.

Powered by Google App Engine
This is Rietveld 408576698