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

Unified Diff: media/filters/ffmpeg_demuxer_unittest.cc

Issue 2699563002: Issue a parse error on unexpected negative timestamps. (Closed)
Patch Set: Rebase. Created 3 years, 10 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_demuxer.cc ('k') | media/test/data/negative_ts.flac » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_demuxer_unittest.cc
diff --git a/media/filters/ffmpeg_demuxer_unittest.cc b/media/filters/ffmpeg_demuxer_unittest.cc
index 36ff7e1afae4e3b6fe1ba8c9b65a0a98e18ceb50..9be2465897ef9698db537d3a23b8879d6af3ae9e 100644
--- a/media/filters/ffmpeg_demuxer_unittest.cc
+++ b/media/filters/ffmpeg_demuxer_unittest.cc
@@ -291,16 +291,6 @@ TEST_F(FFmpegDemuxerTest, Initialize_OpenFails) {
event.RunAndWaitForStatus(DEMUXER_ERROR_COULD_NOT_OPEN);
}
-// TODO(acolwell): Uncomment this test when we discover a file that passes
-// avformat_open_input(), but has avformat_find_stream_info() fail.
-//
-//TEST_F(FFmpegDemuxerTest, Initialize_ParseFails) {
-// ("find_stream_info_fail.webm");
-// demuxer_->Initialize(
-// &host_, NewExpectedStatusCB(DEMUXER_ERROR_COULD_NOT_PARSE));
-// base::RunLoop().RunUntilIdle();
-//}
-
TEST_F(FFmpegDemuxerTest, Initialize_NoStreams) {
// Open a file with no streams whatsoever.
CreateDemuxer("no_streams.webm");
@@ -631,6 +621,13 @@ TEST_F(FFmpegDemuxerTest, Read_AudioNoStartTime) {
}
}
+TEST_F(FFmpegDemuxerTest, Read_InvalidNegativeTimestamp) {
+ CreateDemuxer("negative_ts.flac");
+ InitializeDemuxer();
+ EXPECT_CALL(host_, OnDemuxerError(DEMUXER_ERROR_COULD_NOT_PARSE));
+ ReadUntilEndOfStream(GetStream(DemuxerStream::AUDIO));
+}
+
// TODO(dalecurtis): Test is disabled since FFmpeg does not currently guarantee
// the order of demuxed packets in OGG containers. Re-enable and fix key frame
// expectations once we decide to either workaround it or attempt a fix
« no previous file with comments | « media/filters/ffmpeg_demuxer.cc ('k') | media/test/data/negative_ts.flac » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698