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

Unified Diff: media/filters/ffmpeg_demuxer_unittest.cc

Issue 353163004: Fix missing seek information when video has no start time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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') | no next file » | 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 636b75735469e55e16ce6b63f88be85273c23cc1..2cfcee225359eae6a9379da797f9de0d3c895e4c 100644
--- a/media/filters/ffmpeg_demuxer_unittest.cc
+++ b/media/filters/ffmpeg_demuxer_unittest.cc
@@ -193,6 +193,10 @@ class FFmpegDemuxerTest : public testing::Test {
return demuxer_->glue_->format_context();
}
+ int preferred_seeking_stream_index() const {
+ return demuxer_->preferred_stream_for_seeking_.first;
+ }
+
void ReadUntilEndOfStream(DemuxerStream* stream) {
bool got_eos_buffer = false;
const int kMaxBuffers = 170;
@@ -412,6 +416,12 @@ TEST_F(FFmpegDemuxerTest, Read_Text) {
message_loop_.Run();
}
+TEST_F(FFmpegDemuxerTest, SeekInitialized_NoVideoStartTime) {
+ CreateDemuxer("audio-start-time-only.webm");
+ InitializeDemuxer();
+ EXPECT_EQ(0, preferred_seeking_stream_index());
+}
+
TEST_F(FFmpegDemuxerTest, Read_VideoPositiveStartTime) {
const int64 kTimelineOffsetMs = 1352550896000LL;
« no previous file with comments | « media/filters/ffmpeg_demuxer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698