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

Unified Diff: media/base/pts_stream.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/base/pts_stream.cc
diff --git a/media/base/pts_stream.cc b/media/base/pts_stream.cc
index 0223cdbffd5a3de204cdbf75bea2df8005aabddc..ad31d4efc0ed64f52043f39c8739b75dba26cfff 100644
--- a/media/base/pts_stream.cc
+++ b/media/base/pts_stream.cc
@@ -31,7 +31,7 @@ void PtsStream::Flush() {
void PtsStream::EnqueuePts(StreamSample* sample) {
DCHECK(sample);
- if (!sample->IsEndOfStream() && sample->GetTimestamp() != kNoTimestamp) {
+ if (!sample->IsEndOfStream() && sample->GetTimestamp() != kNoTimestamp()) {
pts_heap_.Push(sample->GetTimestamp());
}
}
@@ -46,7 +46,7 @@ void PtsStream::UpdatePtsAndDuration(StreamSample* sample) {
// situation and set the timestamp to kInvalidTimestamp.
DCHECK(sample);
base::TimeDelta timestamp = sample->GetTimestamp();
- if (timestamp != kNoTimestamp &&
+ if (timestamp != kNoTimestamp() &&
timestamp.ToInternalValue() != 0) {
current_pts_ = timestamp;
// We need to clean up the timestamp we pushed onto the |pts_heap_|.
@@ -56,18 +56,18 @@ void PtsStream::UpdatePtsAndDuration(StreamSample* sample) {
// If the frame did not have pts, try to get the pts from the |pts_heap|.
current_pts_ = pts_heap_.Top();
pts_heap_.Pop();
- } else if (current_pts_ != kNoTimestamp) {
+ } else if (current_pts_ != kNoTimestamp()) {
// Guess assuming this frame was the same as the last frame.
current_pts_ = current_pts_ + current_duration_;
} else {
// Now we really have no clue!!! Mark an invalid timestamp and let the
// video renderer handle it (i.e., drop frame).
- current_pts_ = kNoTimestamp;
+ current_pts_ = kNoTimestamp();
}
// Fill in the duration, using the frame itself as the authoratative source.
base::TimeDelta duration = sample->GetDuration();
- if (duration != kNoTimestamp &&
+ if (duration != kNoTimestamp() &&
duration.ToInternalValue() != 0) {
current_duration_ = duration;
} else {

Powered by Google App Engine
This is Rietveld 408576698