summaryrefslogtreecommitdiffstats
path: root/media/base/audio_decoder_config.cc
diff options
context:
space:
mode:
Diffstat (limited to 'media/base/audio_decoder_config.cc')
-rw-r--r--media/base/audio_decoder_config.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/media/base/audio_decoder_config.cc b/media/base/audio_decoder_config.cc
index 06a1643..09910ed 100644
--- a/media/base/audio_decoder_config.cc
+++ b/media/base/audio_decoder_config.cc
@@ -20,8 +20,7 @@ AudioDecoderConfig::AudioDecoderConfig()
channel_layout_(CHANNEL_LAYOUT_UNSUPPORTED),
samples_per_second_(0),
bytes_per_frame_(0),
- is_encrypted_(false),
- codec_delay_(0) {
+ is_encrypted_(false) {
}
AudioDecoderConfig::AudioDecoderConfig(AudioCodec codec,
@@ -33,7 +32,7 @@ AudioDecoderConfig::AudioDecoderConfig(AudioCodec codec,
bool is_encrypted) {
Initialize(codec, sample_format, channel_layout, samples_per_second,
extra_data, extra_data_size, is_encrypted, true,
- base::TimeDelta(), 0);
+ base::TimeDelta(), base::TimeDelta());
}
void AudioDecoderConfig::Initialize(AudioCodec codec,
@@ -45,7 +44,7 @@ void AudioDecoderConfig::Initialize(AudioCodec codec,
bool is_encrypted,
bool record_stats,
base::TimeDelta seek_preroll,
- int codec_delay) {
+ base::TimeDelta codec_delay) {
CHECK((extra_data_size != 0) == (extra_data != NULL));
if (record_stats) {
@@ -89,7 +88,7 @@ bool AudioDecoderConfig::IsValidConfig() const {
samples_per_second_ <= limits::kMaxSampleRate &&
sample_format_ != kUnknownSampleFormat &&
seek_preroll_ >= base::TimeDelta() &&
- codec_delay_ >= 0;
+ codec_delay_ >= base::TimeDelta();
}
bool AudioDecoderConfig::Matches(const AudioDecoderConfig& config) const {
@@ -115,7 +114,7 @@ std::string AudioDecoderConfig::AsHumanReadableString() const {
<< " sample_format: " << sample_format()
<< " bytes_per_frame: " << bytes_per_frame()
<< " seek_preroll: " << seek_preroll().InMilliseconds() << "ms"
- << " codec_delay: " << codec_delay()
+ << " codec_delay: " << codec_delay().InMilliseconds() << "ms"
<< " has extra data? " << (extra_data() ? "true" : "false")
<< " encrypted? " << (is_encrypted() ? "true" : "false");
return s.str();