Index: media/filters/decrypting_demuxer_stream_unittest.cc |
diff --git a/media/filters/decrypting_demuxer_stream_unittest.cc b/media/filters/decrypting_demuxer_stream_unittest.cc |
index 3e85d7f794a89f3d9419e4c33b58a0b76cb73944..9184f23df304ac909cb37ce618067fa2aab182ea 100644 |
--- a/media/filters/decrypting_demuxer_stream_unittest.cc |
+++ b/media/filters/decrypting_demuxer_stream_unittest.cc |
@@ -119,16 +119,20 @@ class DecryptingDemuxerStreamTest : public testing::Test { |
.WillOnce(SaveArg<1>(&key_added_cb_)); |
AudioDecoderConfig input_config( |
- kCodecVorbis, 16, CHANNEL_LAYOUT_STEREO, 44100, NULL, 0, true); |
+ kCodecVorbis, kSampleFormatPlanarF32, CHANNEL_LAYOUT_STEREO, 44100, |
+ NULL, 0, true); |
InitializeAudioAndExpectStatus(input_config, PIPELINE_OK); |
const AudioDecoderConfig& output_config = |
demuxer_stream_->audio_decoder_config(); |
EXPECT_EQ(DemuxerStream::AUDIO, demuxer_stream_->type()); |
EXPECT_FALSE(output_config.is_encrypted()); |
- EXPECT_EQ(16, output_config.bits_per_channel()); |
- EXPECT_EQ(CHANNEL_LAYOUT_STEREO, output_config.channel_layout()); |
- EXPECT_EQ(44100, output_config.samples_per_second()); |
+ EXPECT_EQ(input_config.bits_per_channel(), |
+ output_config.bits_per_channel()); |
+ EXPECT_EQ(input_config.channel_layout(), output_config.channel_layout()); |
+ EXPECT_EQ(input_config.sample_format(), output_config.sample_format()); |
+ EXPECT_EQ(input_config.samples_per_second(), |
+ output_config.samples_per_second()); |
} |
void ReadAndExpectBufferReadyWith( |
@@ -241,16 +245,16 @@ TEST_F(DecryptingDemuxerStreamTest, Initialize_NormalAudio) { |
// Ensure that DecryptingDemuxerStream only accepts encrypted audio. |
TEST_F(DecryptingDemuxerStreamTest, Initialize_UnencryptedAudioConfig) { |
- AudioDecoderConfig config(kCodecVorbis, 16, CHANNEL_LAYOUT_STEREO, 44100, |
- NULL, 0, false); |
+ AudioDecoderConfig config(kCodecVorbis, kSampleFormatPlanarF32, |
+ CHANNEL_LAYOUT_STEREO, 44100, NULL, 0, false); |
InitializeAudioAndExpectStatus(config, DEMUXER_ERROR_NO_SUPPORTED_STREAMS); |
} |
// Ensure DecryptingDemuxerStream handles invalid audio config without crashing. |
TEST_F(DecryptingDemuxerStreamTest, Initialize_InvalidAudioConfig) { |
- AudioDecoderConfig config(kUnknownAudioCodec, 0, CHANNEL_LAYOUT_STEREO, 0, |
- NULL, 0, true); |
+ AudioDecoderConfig config(kUnknownAudioCodec, kUnknownSampleFormat, |
+ CHANNEL_LAYOUT_STEREO, 0,NULL, 0, true); |
InitializeAudioAndExpectStatus(config, DEMUXER_ERROR_NO_SUPPORTED_STREAMS); |
} |