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

Unified Diff: media/filters/opus_audio_decoder.cc

Issue 251583003: Ensure DiscardPadding is parsed as a signed integer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on top of test disable. Created 6 years, 8 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
« no previous file with comments | « no previous file | media/filters/pipeline_integration_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | media/filters/pipeline_integration_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698