summaryrefslogtreecommitdiffstats
path: root/chromecast
diff options
context:
space:
mode:
authorkmackay <kmackay@chromium.org>2016-03-14 17:37:53 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-15 00:39:37 +0000
commita0ca9f7d9a53b800c0f94f813f10955c7f970c9d (patch)
tree083f988a6b6997d3030b730dc346ec2be5653d61 /chromecast
parentd104a43445b8a66214d0a3153ed11dc2b3375967 (diff)
downloadchromium_src-a0ca9f7d9a53b800c0f94f813f10955c7f970c9d.zip
chromium_src-a0ca9f7d9a53b800c0f94f813f10955c7f970c9d.tar.gz
chromium_src-a0ca9f7d9a53b800c0f94f813f10955c7f970c9d.tar.bz2
[Chromecast] Allow the PTS to advance a little bit while paused
In some backends, the PTS continues to advance for a small amount while paused. For now, don't make this a test failure. BUG= internal b/27613212 Review URL: https://codereview.chromium.org/1798183003 Cr-Commit-Position: refs/heads/master@{#381136}
Diffstat (limited to 'chromecast')
-rw-r--r--chromecast/media/cma/backend/audio_video_pipeline_device_unittest.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/chromecast/media/cma/backend/audio_video_pipeline_device_unittest.cc b/chromecast/media/cma/backend/audio_video_pipeline_device_unittest.cc
index c78af4a..f80cc61 100644
--- a/chromecast/media/cma/backend/audio_video_pipeline_device_unittest.cc
+++ b/chromecast/media/cma/backend/audio_video_pipeline_device_unittest.cc
@@ -51,6 +51,8 @@ const base::TimeDelta kMonitorLoopDelay = base::TimeDelta::FromMilliseconds(20);
// we push buffers with a PTS before the start PTS. In this case the backend
// should report the PTS as no later than the last pushed buffers.
const int64_t kStartPts = 1000 * 1000;
+// Amount that PTS is allowed to progress past the time that Pause() was called.
+const int kPausePtsSlackMs = 75;
void IgnoreEos() {}
@@ -820,8 +822,9 @@ void AudioVideoPipelineDeviceTest::OnPauseCompleted() {
base::TimeDelta media_time =
base::TimeDelta::FromMicroseconds(backend_->GetCurrentPts());
- // Make sure that the PTS did not advance while paused.
- EXPECT_EQ(pause_time_, media_time);
+ // Make sure that the PTS did not advance too much while paused.
+ EXPECT_LT(media_time,
+ pause_time_ + base::TimeDelta::FromMilliseconds(kPausePtsSlackMs));
pause_time_ = media_time;
pause_pattern_idx_ = (pause_pattern_idx_ + 1) % pause_pattern_.size();