Commit b7e59f47 authored by Sergey Ulanov's avatar Sergey Ulanov Committed by Commit Bot

[Fuchsia] use timeline presence as indicator that playback has started.

Previously FuchsiaAudioRenderer was expecting timeline update with
stream_delta > 0 after Start(). That doesn't work correctly when
playback is started with playbackRate=0.0 . Presence of
presentation_timeline attribute in AudioConsumerStatus indicates that
playback has started, i.e. Start() call has been handled, so it's not
necessary to check stream_delta > 0.

Bug: 1027048
Change-Id: Ie4de38c34a2ce6cb57faf567b784275b3a2d5a25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1976285
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: default avatarKevin Marshall <kmarshall@chromium.org>
Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#726492}
parent 369f8991
......@@ -347,10 +347,8 @@ void FuchsiaAudioRenderer::OnAudioConsumerStatusChanged(
}
if (status.has_presentation_timeline()) {
bool playing = status.presentation_timeline().subject_delta > 0;
base::AutoLock lock(state_lock_);
if (playing && state_ != PlaybackState::kStopped) {
if (state_ != PlaybackState::kStopped) {
if (state_ == PlaybackState::kStarting) {
state_ = PlaybackState::kPlaying;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment