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

Unified Diff: media/filters/frame_processor_unittest.cc

Issue 344513002: MSE: Reduce spurious discontinuities caused by partial append window start overlaps (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/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 b6f5d2f00fd837f01803bb60329c736a136d7792..f4cde5a1c0c3ba22368e734060af241b6106f05a 100644
--- a/media/filters/frame_processor_unittest.cc
+++ b/media/filters/frame_processor_unittest.cc
@@ -633,6 +633,25 @@ TEST_P(FrameProcessorTest, AllowNegativeFramePTSAndDTSBeforeOffsetAdjustment) {
}
}
+TEST_P(FrameProcessorTest, PartialAppendWindowFilterNoDiscontinuity) {
+ // Tests that spurious discontinuity is not introduced by a partially
+ // trimmed frame.
+ InSequence s;
+ AddTestTracks(HAS_AUDIO);
+ new_media_segment_ = true;
+ if (GetParam())
+ frame_processor_->SetSequenceMode(true);
+ EXPECT_CALL(callbacks_,
+ PossibleDurationIncrease(base::TimeDelta::FromMilliseconds(29)));
+
+ append_window_start_ = base::TimeDelta::FromMilliseconds(7);
+ ProcessFrames("0K 19K", "");
+
+ EXPECT_EQ(base::TimeDelta(), timestamp_offset_);
+ CheckExpectedRangesByTimestamp(audio_.get(), "{ [7,29) }");
+ CheckReadsThenReadStalls(audio_.get(), "7:0 19");
+}
+
INSTANTIATE_TEST_CASE_P(SequenceMode, FrameProcessorTest, Values(true));
INSTANTIATE_TEST_CASE_P(SegmentsMode, FrameProcessorTest, Values(false));
« no previous file with comments | « media/filters/frame_processor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698