diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-15 05:17:30 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-15 05:17:30 +0000 |
commit | 7353213fddbc0c64cec7c6f119387de2cbf93f12 (patch) | |
tree | 82e24ba525d352e77a319204a3a5f946bfc38faa /media | |
parent | f7a015e81a689a7518d4335b263c850511608254 (diff) | |
download | chromium_src-7353213fddbc0c64cec7c6f119387de2cbf93f12.zip chromium_src-7353213fddbc0c64cec7c6f119387de2cbf93f12.tar.gz chromium_src-7353213fddbc0c64cec7c6f119387de2cbf93f12.tar.bz2 |
Workaround a race condition caused by not synchronization destruction of the pipeline.
BUG=16059
TEST=none
Review URL: http://codereview.chromium.org/171018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23514 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/filters/video_renderer_base.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/media/filters/video_renderer_base.cc b/media/filters/video_renderer_base.cc index 1660f01..5a320c9 100644 --- a/media/filters/video_renderer_base.cc +++ b/media/filters/video_renderer_base.cc @@ -296,6 +296,13 @@ void VideoRendererBase::GetCurrentFrame(scoped_refptr<VideoFrame>* frame_out) { void VideoRendererBase::OnReadComplete(VideoFrame* frame) { AutoLock auto_lock(lock_); + + // TODO(ajwong): Work around cause we don't synchronize on stop. Correct + // fix is to resolve http://crbug.com/16059. + if (state_ == kStopped) { + return; + } + DCHECK(state_ == kPaused || state_ == kSeeking || state_ == kPlaying || state_ == kEnded); DCHECK_GT(pending_reads_, 0u); |