Skip to content

Commit

Permalink
[Video] Reset new processed frame callback on the compositor thread.
Browse files Browse the repository at this point in the history
The callback is set and used on the compositor thread but is reset on the
media thread, causing a data race.
Moved resetting the callback to the OnRenderingStateChange when the state is
set to false.

BUG=684458
TEST=manual

Review-Url: https://codereview.chromium.org/2651323002
Cr-Commit-Position: refs/heads/master@{#446515}
  • Loading branch information
avayvod authored and Commit bot committed Jan 27, 2017
1 parent c80c4a6 commit b5c8d0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion media/blink/video_frame_compositor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ void VideoFrameCompositor::OnRendererStateUpdate(bool new_state) {
if (rendering_) {
auto_open_close_->Begin();
} else {
new_processed_frame_cb_.Reset();
auto_open_close_->End();
}

Expand Down Expand Up @@ -139,7 +140,6 @@ void VideoFrameCompositor::Stop() {
compositor_task_runner_->PostTask(
FROM_HERE, base::Bind(&VideoFrameCompositor::OnRendererStateUpdate,
base::Unretained(this), false));
new_processed_frame_cb_.Reset();
}

void VideoFrameCompositor::PaintSingleFrame(
Expand Down

0 comments on commit b5c8d0d

Please sign in to comment.