Commit 75d50edf authored by Chris Cunningham's avatar Chris Cunningham Committed by Commit Bot

AudioRenderer/Clock: Remove speculative CHECKs

Crash is gone. Only the AudioClock CHECK seems to have been hit, but
that disappeared after M62 when we stopped shipping x86 on mac.

BUG=674856

Change-Id: I446f05ae659f0fa6622b5662f9f8e7ccd206c23f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1894244
Auto-Submit: Chrome Cunningham <chcunningham@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711760}
parent 9e6a2efc
......@@ -51,13 +51,6 @@ void AudioClock::WroteAudio(int frames_written,
PushBufferedAudioData(frames_requested - frames_written, 0.0);
PopBufferedAudioData(frames_played);
// Trying to track down AudioClock crash, http://crbug.com/674856.
// It may be that we crash due to running out of memory. |buffered_| should
// never come close to 1000 elements in size. In most cases it should have
// just one entry, though additional entries are added when playback rate
// changes.
CHECK_LT(buffered_.size(), 1000U);
// Update our front and back timestamps. The back timestamp is considered the
// authoritative source of truth, so base the front timestamp on range of data
// buffered. Doing so avoids accumulation errors on the front timestamp.
......
......@@ -97,12 +97,6 @@ AudioRendererImpl::~AudioRendererImpl() {
// After this call, the |sink_| will not call back into |this| anymore.
sink_->Stop();
// Trying to track down AudioClock crash, http://crbug.com/674856. If the sink
// hasn't truly stopped above we will fail to acquire the lock. The sink must
// be stopped to avoid destroying the AudioClock while its still being used.
CHECK(lock_.Try());
lock_.Release();
if (init_cb_)
FinishInitialization(PIPELINE_ERROR_ABORT);
}
......@@ -354,18 +348,6 @@ void AudioRendererImpl::Initialize(DemuxerStream* stream,
DCHECK(sink_.get());
TRACE_EVENT_ASYNC_BEGIN0("media", "AudioRendererImpl::Initialize", this);
// Trying to track down AudioClock crash, http://crbug.com/674856.
// Initialize should never be called while Rendering is ongoing. This can lead
// to race conditions between media/audio-device threads.
CHECK(!sink_playing_);
// This lock is not required by Initialize, but failing to acquire the lock
// would indicate a race with the rendering thread, which should not be active
// at this time. This is just extra verification on the |sink_playing_| CHECK
// above. We hold |lock_| while setting |sink_playing_|, but release the lock
// when calling sink_->Pause() to avoid deadlocking with the AudioMixer.
CHECK(lock_.Try());
lock_.Release();
// If we are re-initializing playback (e.g. switching media tracks), stop the
// sink first.
if (state_ == kFlushed)
......
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