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

Unified Diff: media/filters/ffmpeg_audio_decoder.cc

Issue 9225001: Remove two static initializers (media/base/{buffers,media_log}.cc) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 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/filters/ffmpeg_audio_decoder.cc
diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc
index 61aa02ba82c19ce92ae77d7547d1a9dda92a44b7..b4823caa764c5f9ee959ca02225c503e53ec629e 100644
--- a/media/filters/ffmpeg_audio_decoder.cc
+++ b/media/filters/ffmpeg_audio_decoder.cc
@@ -31,8 +31,8 @@ static bool IsTimestampMarkerPacket(int result, Buffer* input) {
// We can get a positive result but no decoded data. This is ok because this
// this can be a marker packet that only contains timestamp.
return result > 0 && !input->IsEndOfStream() &&
- input->GetTimestamp() != kNoTimestamp &&
- input->GetDuration() != kNoTimestamp;
+ input->GetTimestamp() != kNoTimestamp() &&
+ input->GetDuration() != kNoTimestamp();
}
// Returns true if the decode result was end of stream.
@@ -151,7 +151,7 @@ void FFmpegAudioDecoder::DoInitialize(
void FFmpegAudioDecoder::DoFlush(const base::Closure& callback) {
avcodec_flush_buffers(codec_context_);
- estimated_next_timestamp_ = kNoTimestamp;
+ estimated_next_timestamp_ = kNoTimestamp();
callback.Run();
}
@@ -171,8 +171,8 @@ void FFmpegAudioDecoder::DoDecodeBuffer(const scoped_refptr<Buffer>& input) {
// FFmpeg tends to seek Ogg audio streams in the middle of nowhere, giving us
// a whole bunch of AV_NOPTS_VALUE packets. Discard them until we find
// something valid. Refer to http://crbug.com/49709
- if (input->GetTimestamp() == kNoTimestamp &&
- estimated_next_timestamp_ == kNoTimestamp &&
+ if (input->GetTimestamp() == kNoTimestamp() &&
+ estimated_next_timestamp_ == kNoTimestamp() &&
!input->IsEndOfStream()) {
ReadFromDemuxerStream();
return;
@@ -261,7 +261,7 @@ void FFmpegAudioDecoder::UpdateDurationAndTimestamp(
output->SetDuration(duration);
// Use the incoming timestamp if it's valid.
- if (input->GetTimestamp() != kNoTimestamp) {
+ if (input->GetTimestamp() != kNoTimestamp()) {
output->SetTimestamp(input->GetTimestamp());
estimated_next_timestamp_ = input->GetTimestamp() + duration;
return;
@@ -270,7 +270,7 @@ void FFmpegAudioDecoder::UpdateDurationAndTimestamp(
// Otherwise use an estimated timestamp and attempt to update the estimation
// as long as it's valid.
output->SetTimestamp(estimated_next_timestamp_);
- if (estimated_next_timestamp_ != kNoTimestamp) {
+ if (estimated_next_timestamp_ != kNoTimestamp()) {
estimated_next_timestamp_ += duration;
}
}

Powered by Google App Engine
This is Rietveld 408576698