Index: media/filters/opus_audio_decoder.cc |
diff --git a/media/filters/opus_audio_decoder.cc b/media/filters/opus_audio_decoder.cc |
index e54bf08f502657478d362eb4593eabcb0d2e8aef..479f5887ba9407e891c065cf0731f1766e96152e 100644 |
--- a/media/filters/opus_audio_decoder.cc |
+++ b/media/filters/opus_audio_decoder.cc |
@@ -491,12 +491,7 @@ bool OpusAudioDecoder::Decode(const scoped_refptr<DecoderBuffer>& input, |
if (output_timestamp_helper_->base_timestamp() == kNoTimestamp() && |
!input->end_of_stream()) { |
DCHECK(input->timestamp() != kNoTimestamp()); |
- // Adjust the timestamp helper so the base timestamp is corrected for frames |
- // dropped due to codec delay. |
output_timestamp_helper_->SetBaseTimestamp(input->timestamp()); |
- output_timestamp_helper_->SetBaseTimestamp( |
- input->timestamp() - |
- output_timestamp_helper_->GetFrameDuration(config_.codec_delay())); |
} |
// Trim off any extraneous allocation. |
@@ -522,6 +517,8 @@ bool OpusAudioDecoder::Decode(const scoped_refptr<DecoderBuffer>& input, |
} |
output_buffer->get()->TrimEnd(discard_padding); |
frames_to_output -= discard_padding; |
+ } else { |
+ DCHECK_EQ(input->discard_padding().InMicroseconds(), 0); |
} |
} else { |
frames_to_discard_ -= frames_to_output; |