diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/renderer/media/audio_renderer_impl.cc | 1 | ||||
-rw-r--r-- | chrome/renderer/media/data_source_impl.cc | 3 | ||||
-rw-r--r-- | chrome/renderer/media/video_renderer_impl.cc | 4 | ||||
-rw-r--r-- | chrome/renderer/media/video_renderer_impl.h | 3 |
4 files changed, 11 insertions, 0 deletions
diff --git a/chrome/renderer/media/audio_renderer_impl.cc b/chrome/renderer/media/audio_renderer_impl.cc index 9276b0e..a0b6ae3 100644 --- a/chrome/renderer/media/audio_renderer_impl.cc +++ b/chrome/renderer/media/audio_renderer_impl.cc @@ -55,6 +55,7 @@ bool AudioRendererImpl::OnInitialize(const media::MediaFormat& media_format) { } void AudioRendererImpl::OnStop() { + delegate_->SetAudioRenderer(NULL); if (!resource_release_event_.IsSignaled()) { render_loop_->PostTask(FROM_HERE, NewRunnableMethod(this, diff --git a/chrome/renderer/media/data_source_impl.cc b/chrome/renderer/media/data_source_impl.cc index 65a725f..9ee3331 100644 --- a/chrome/renderer/media/data_source_impl.cc +++ b/chrome/renderer/media/data_source_impl.cc @@ -45,6 +45,8 @@ void DataSourceImpl::Stop() { return; stopped_ = true; + delegate_->SetDataSource(NULL); + // Wakes up demuxer waiting on |read_event_| in Read(). read_event_.Signal(); // Wakes up demuxer waiting on |seek_event_| in SetPosition(). @@ -226,6 +228,7 @@ void DataSourceImpl::ReleaseResources(bool render_thread_is_dying) { resource_loader_bridge_ = NULL; } else if (resource_loader_bridge_) { resource_loader_bridge_->Cancel(); + delete resource_loader_bridge_; resource_loader_bridge_ = NULL; } resource_release_event_.Signal(); diff --git a/chrome/renderer/media/video_renderer_impl.cc b/chrome/renderer/media/video_renderer_impl.cc index 542959f..ed1704f 100644 --- a/chrome/renderer/media/video_renderer_impl.cc +++ b/chrome/renderer/media/video_renderer_impl.cc @@ -13,6 +13,10 @@ VideoRendererImpl::VideoRendererImpl(WebMediaPlayerDelegateImpl* delegate) delegate_->SetVideoRenderer(this); } +void VideoRendererImpl::OnStop() { + delegate_->SetVideoRenderer(NULL); +} + bool VideoRendererImpl::OnInitialize(size_t width, size_t height) { video_size_.SetSize(width, height); bitmap_.setConfig(SkBitmap::kARGB_8888_Config, width, height); diff --git a/chrome/renderer/media/video_renderer_impl.h b/chrome/renderer/media/video_renderer_impl.h index 963b862..01ded10 100644 --- a/chrome/renderer/media/video_renderer_impl.h +++ b/chrome/renderer/media/video_renderer_impl.h @@ -49,6 +49,9 @@ class VideoRendererImpl : public media::VideoRendererBase { // Method called by base class during initialization. virtual bool OnInitialize(size_t width, size_t height); + // Method called by VideoRendererBase to tell us to stop. + virtual void OnStop(); + // Method called by the VideoRendererBase when a repaint is needed. virtual void OnPaintNeeded(); |