diff options
Diffstat (limited to 'Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp')
-rw-r--r-- | Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp index dd2bc221e..891c31f3f 100644 --- a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp +++ b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp @@ -31,11 +31,11 @@ #include "platform/WebCString.h" #include "platform/WebCanvas.h" #include "platform/WebKitPlatformSupport.h" -#include "platform/WebMimeRegistry.h" #include "platform/WebRect.h" #include "platform/WebSize.h" #include "platform/WebString.h" #include "platform/WebURL.h" +#include <public/WebMimeRegistry.h> #if USE(ACCELERATED_COMPOSITING) #include "RenderLayerCompositor.h" @@ -237,6 +237,9 @@ void WebMediaPlayerClientImpl::load(const String& url) m_url = url; if (m_preload == MediaPlayer::None) { +#if ENABLE(WEB_AUDIO) + m_audioSourceProvider.wrap(0); // Clear weak reference to m_webMediaPlayer's WebAudioSourceProvider. +#endif m_webMediaPlayer.clear(); m_delayingLoad = true; } else @@ -245,6 +248,10 @@ void WebMediaPlayerClientImpl::load(const String& url) void WebMediaPlayerClientImpl::loadInternal() { +#if ENABLE(WEB_AUDIO) + m_audioSourceProvider.wrap(0); // Clear weak reference to m_webMediaPlayer's WebAudioSourceProvider. +#endif + Frame* frame = static_cast<HTMLMediaElement*>(m_mediaPlayer->mediaPlayerClient())->document()->frame(); m_webMediaPlayer = createWebMediaPlayer(this, frame); if (m_webMediaPlayer) { @@ -688,8 +695,6 @@ WebMediaPlayerClientImpl::WebMediaPlayerClientImpl() #if ENABLE(WEB_AUDIO) void WebMediaPlayerClientImpl::AudioSourceProviderImpl::wrap(WebAudioSourceProvider* provider) { - if (m_webAudioSourceProvider && m_webAudioSourceProvider != provider) - m_webAudioSourceProvider->setClient(0); m_webAudioSourceProvider = provider; if (m_webAudioSourceProvider) m_webAudioSourceProvider->setClient(m_client.get()); |