Skip to content

Commit

Permalink
Revert of Always post buffering state updates since they may change s…
Browse files Browse the repository at this point in the history
…ink state. (patchset chromium#1 id:1 of https://codereview.chromium.org/1161463006/)

Reason for revert:
Speculative revert for Blink layout tests crashes on Nexus 4:
http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Android%20%28Nexus4%29
(SEGV on CrGpuMain thread is observed)

Sorry if my guess is not correct; there wasn't
a clear signal to identify the culprit.

Original issue's description:
> Always post buffering state updates since they may change sink state.
>
> The lock must never be held when OnTimeStateChanged() is calling into
> the VideoRendererSink or we can deadlock the compositor thread.
>
> With video-only playback occurs a buffering state change for underflow
> would immediately invoke OnTimeStateChanged(false) which would try to
> stop the VideoRendererSink under lock.
>
> BUG=496466
> TEST=video only playback doesn't deadlock.
>
> Committed: https://crrev.com/9d8a53f3bf01aed28abbd1f9a713a25362c0d158
> Cr-Commit-Position: refs/heads/master@{#332772}

TBR=xhwang@chromium.org,dalecurtis@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=496466

Review URL: https://codereview.chromium.org/1159573005

Cr-Commit-Position: refs/heads/master@{#332808}
  • Loading branch information
yutak authored and Commit bot committed Jun 4, 2015
1 parent b2e0427 commit 9fc2a61
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions media/renderers/video_renderer_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,8 @@ void VideoRendererImpl::Initialize(
// failed.
init_cb_ = BindToCurrentLoop(init_cb);

// Always post |buffering_state_cb_| because it may otherwise invoke reentrant
// calls to OnTimeStateChanged() under lock, which can deadlock the compositor
// and media threads.
buffering_state_cb_ = BindToCurrentLoop(buffering_state_cb);

statistics_cb_ = statistics_cb;
buffering_state_cb_ = buffering_state_cb;
paint_cb_ = base::Bind(&VideoRendererSink::PaintFrameUsingOldRenderingPath,
base::Unretained(sink_));
ended_cb_ = ended_cb;
Expand Down

0 comments on commit 9fc2a61

Please sign in to comment.