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

Unified Diff: media/cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.cc

Issue 2158923004: Convert media constants to constexpr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.cc
diff --git a/media/cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.cc b/media/cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.cc
index c0231cd99a5810e63a5af895741566af6078fff9..5971c0cf2070ad29128afedeea1d731efc2a76c0 100644
--- a/media/cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.cc
+++ b/media/cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.cc
@@ -139,9 +139,8 @@ FFmpegCdmAudioDecoder::FFmpegCdmAudioDecoder(ClearKeyCdmHost* host)
channels_(0),
av_sample_format_(0),
bytes_per_frame_(0),
- last_input_timestamp_(kNoTimestamp()),
- output_bytes_to_drop_(0) {
-}
+ last_input_timestamp_(kNoTimestamp),
+ output_bytes_to_drop_(0) {}
FFmpegCdmAudioDecoder::~FFmpegCdmAudioDecoder() {
ReleaseFFmpegResources();
@@ -233,7 +232,7 @@ cdm::Status FFmpegCdmAudioDecoder::DecodeBuffer(
bool is_vorbis = codec_context_->codec_id == AV_CODEC_ID_VORBIS;
if (!is_end_of_stream) {
- if (last_input_timestamp_ == kNoTimestamp()) {
+ if (last_input_timestamp_ == kNoTimestamp) {
if (is_vorbis && timestamp < base::TimeDelta()) {
// Dropping frames for negative timestamps as outlined in section A.2
// in the Vorbis spec. http://xiph.org/vorbis/doc/Vorbis_I_spec.html
@@ -243,7 +242,7 @@ cdm::Status FFmpegCdmAudioDecoder::DecodeBuffer(
} else {
last_input_timestamp_ = timestamp;
}
- } else if (timestamp != kNoTimestamp()) {
+ } else if (timestamp != kNoTimestamp) {
if (timestamp < last_input_timestamp_) {
base::TimeDelta diff = timestamp - last_input_timestamp_;
DVLOG(1) << "Input timestamps are not monotonically increasing! "
@@ -299,9 +298,9 @@ cdm::Status FFmpegCdmAudioDecoder::DecodeBuffer(
packet.size -= result;
packet.data += result;
- if (output_timestamp_helper_->base_timestamp() == kNoTimestamp() &&
+ if (output_timestamp_helper_->base_timestamp() == kNoTimestamp &&
!is_end_of_stream) {
- DCHECK(timestamp != kNoTimestamp());
+ DCHECK(timestamp != kNoTimestamp);
if (output_bytes_to_drop_ > 0) {
// Currently Vorbis is the only codec that causes us to drop samples.
// If we have to drop samples it always means the timeline starts at 0.
@@ -410,8 +409,8 @@ cdm::Status FFmpegCdmAudioDecoder::DecodeBuffer(
}
void FFmpegCdmAudioDecoder::ResetTimestampState() {
- output_timestamp_helper_->SetBaseTimestamp(kNoTimestamp());
- last_input_timestamp_ = kNoTimestamp();
+ output_timestamp_helper_->SetBaseTimestamp(kNoTimestamp);
+ last_input_timestamp_ = kNoTimestamp;
output_bytes_to_drop_ = 0;
}

Powered by Google App Engine
This is Rietveld 408576698