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

Unified Diff: media/filters/frame_processor_unittest.cc

Issue 294393002: MSE: Allow fully discarding frames with resulting timestamps below 0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« media/filters/frame_processor.cc ('K') | « media/filters/frame_processor.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/frame_processor_unittest.cc
diff --git a/media/filters/frame_processor_unittest.cc b/media/filters/frame_processor_unittest.cc
index 6061bfe97689b426f01fe89cf8b036165d40b8cf..62eb72bbceb119f528530d329459548091eff0ff 100644
--- a/media/filters/frame_processor_unittest.cc
+++ b/media/filters/frame_processor_unittest.cc
@@ -567,6 +567,22 @@ TEST_P(FrameProcessorTest, AudioVideo_Discontinuity) {
}
}
+TEST_P(FrameProcessorTest, VerifyAppendWindowFiltersNegativeBufferTimestamps) {
+ InSequence S;
+ AddTestTracks(HAS_AUDIO);
+ new_media_segment_ = true;
+ if (GetParam())
+ frame_processor_->SetSequenceMode(true);
+
+ SetTimestampOffset(frame_duration_ * -2);
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(frame_duration_));
+ ProcessFrames("0K 10K 20K", "");
+ EXPECT_FALSE(new_media_segment_);
+ EXPECT_EQ(frame_duration_ * -2, timestamp_offset_);
+ CheckExpectedRangesByTimestamp(audio_.get(), "{ [0,10) }");
+ CheckReadsThenReadStalls(audio_.get(), "0:20");
+}
+
INSTANTIATE_TEST_CASE_P(SequenceMode, FrameProcessorTest, Values(true));
INSTANTIATE_TEST_CASE_P(SegmentsMode, FrameProcessorTest, Values(false));
« media/filters/frame_processor.cc ('K') | « media/filters/frame_processor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698