summaryrefslogtreecommitdiffstats
path: root/chromecast
diff options
context:
space:
mode:
authoryucliu <yucliu@chromium.org>2015-11-24 10:43:19 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-24 18:44:54 +0000
commite16a7d3b1c2a6b0cfa9a240e7fdfa8cdda0729c7 (patch)
tree3b02881fa7bcd657f71a0d4116a212030bfb1d64 /chromecast
parent26e8d653923a0981aa6c4f41a770a61c5398eb9a (diff)
downloadchromium_src-e16a7d3b1c2a6b0cfa9a240e7fdfa8cdda0729c7.zip
chromium_src-e16a7d3b1c2a6b0cfa9a240e7fdfa8cdda0729c7.tar.gz
chromium_src-e16a7d3b1c2a6b0cfa9a240e7fdfa8cdda0729c7.tar.bz2
[Chromecast] Ignore MonitorLoop if EOS in unit test
According to specification in media_pipeline_backend.h, GetCurrentPts is only allowed to be called when backend is in playing/paused state. Thus we shouldn't call the function after backend is stopped. BUG=internal b/25852465 Review URL: https://codereview.chromium.org/1474573002 Cr-Commit-Position: refs/heads/master@{#361400}
Diffstat (limited to 'chromecast')
-rw-r--r--chromecast/media/cma/backend/audio_video_pipeline_device_unittest.cc4
1 files changed, 4 insertions, 0 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 f255295..8512370 100644
--- a/chromecast/media/cma/backend/audio_video_pipeline_device_unittest.cc
+++ b/chromecast/media/cma/backend/audio_video_pipeline_device_unittest.cc
@@ -376,6 +376,10 @@ void AudioVideoPipelineDeviceTest::OnPushBufferComplete(
}
void AudioVideoPipelineDeviceTest::MonitorLoop() {
+ // Backend is stopped, no need to monitor the loop any more.
+ if (audio_decoder_ == nullptr && video_decoder_ == nullptr)
+ return;
+
base::TimeDelta media_time =
base::TimeDelta::FromMicroseconds(backend_->GetCurrentPts());