Index: media/filters/ffmpeg_demuxer_unittest.cc |
diff --git a/media/filters/ffmpeg_demuxer_unittest.cc b/media/filters/ffmpeg_demuxer_unittest.cc |
index b32718c0a3c35feb4e5098f7fe22f83ef061646c..64f0f7f5231d26bb95693ba84db6c777bab9f591 100644 |
--- a/media/filters/ffmpeg_demuxer_unittest.cc |
+++ b/media/filters/ffmpeg_demuxer_unittest.cc |
@@ -973,6 +973,38 @@ TEST_F(FFmpegDemuxerTest, Rotate_Metadata_270) { |
ASSERT_EQ(VIDEO_ROTATION_270, stream->video_rotation()); |
} |
+#if defined(ENABLE_AC3_EAC3_AUDIO_DEMUXING) |
+TEST_F(FFmpegDemuxerTest, Read_AC3_Audio) { |
+ CreateDemuxer("bear-ac3.mp4"); |
+ InitializeDemuxer(); |
+ |
+ // Attempt a read from the audio stream and run the message loop until done. |
+ DemuxerStream* audio = demuxer_->GetStream(DemuxerStream::AUDIO); |
+ |
+ // Read the first two frames and check that we are getting expected data |
+ audio->Read(NewReadCB(FROM_HERE, 834, 0, true)); |
+ message_loop_.Run(); |
+ |
+ audio->Read(NewReadCB(FROM_HERE, 836, 34830, true)); |
+ message_loop_.Run(); |
+} |
+ |
+TEST_F(FFmpegDemuxerTest, Read_EAC3_Audio) { |
+ CreateDemuxer("bear-eac3.mp4"); |
+ InitializeDemuxer(); |
+ |
+ // Attempt a read from the audio stream and run the message loop until done. |
+ DemuxerStream* audio = demuxer_->GetStream(DemuxerStream::AUDIO); |
+ |
+ // Read the first two frames and check that we are getting expected data |
+ audio->Read(NewReadCB(FROM_HERE, 870, 0, true)); |
+ message_loop_.Run(); |
+ |
+ audio->Read(NewReadCB(FROM_HERE, 872, 34830, true)); |
+ message_loop_.Run(); |
+} |
+#endif |
+ |
#endif |
} // namespace media |