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

Unified Diff: media/filters/ffmpeg_audio_decoder_unittest.cc

Issue 10831020: Refactor FFmpegAudioDecoder output timestamp logic. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Dale's comments Created 8 years, 4 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 | « media/filters/ffmpeg_audio_decoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_audio_decoder_unittest.cc
diff --git a/media/filters/ffmpeg_audio_decoder_unittest.cc b/media/filters/ffmpeg_audio_decoder_unittest.cc
index f3dfaea033203e5bb1762e5d93eaa22409cbdd57..ae5b82c0774e08129e2075db0bd7137be1366c6a 100644
--- a/media/filters/ffmpeg_audio_decoder_unittest.cc
+++ b/media/filters/ffmpeg_audio_decoder_unittest.cc
@@ -68,7 +68,7 @@ class FFmpegAudioDecoderTest : public testing::Test {
void Initialize() {
EXPECT_CALL(*demuxer_, audio_decoder_config())
- .WillOnce(ReturnRef(config_));
+ .WillRepeatedly(ReturnRef(config_));
decoder_->Initialize(demuxer_,
NewExpectedStatusCB(PIPELINE_OK),
@@ -151,13 +151,10 @@ TEST_F(FFmpegAudioDecoderTest, ProduceAudioSamples) {
Read();
Read();
- // We should have three decoded audio buffers.
- //
- // TODO(scherkus): timestamps are off by one packet due to decoder delay.
ASSERT_EQ(3u, decoded_audio_.size());
ExpectDecodedAudio(0, 0, 2902);
- ExpectDecodedAudio(1, 0, 13061);
- ExpectDecodedAudio(2, 2902, 23219);
+ ExpectDecodedAudio(1, 2902, 13061);
+ ExpectDecodedAudio(2, 15963, 23220);
// Call one more time to trigger EOS.
Read();
« no previous file with comments | « media/filters/ffmpeg_audio_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698