[Webkit-unassigned] [Bug 137025] HTMLMediaElement::removedFrom is not clearing the player and causes lock up of video resource

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 24 10:45:51 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=137025





--- Comment #1 from Eric Carlson <eric.carlson at apple.com>  2014-09-24 10:45:51 PST ---
(In reply to comment #0)
> Hi,
> 
> Calling HTMLMediaElement::removedFrom() function in
> "Source/WebCore/html/HTMLMediaElement.cpp" file will only pause the video.
> 
> But this leads to lock up of video resource when we are playing video in Hardware mode.
> We should explicitly call m_player.clear() to clear the mediaplayer as follows.
> 
> diff --git a/qtwebkit/Source/WebCore/html/HTMLMediaElement.cpp b/qtwebkit/Source/WebCore/html/HTMLMediaElement.cpp
> index 314a85d..1e706f1 100644
> --- a/qtwebkit/Source/WebCore/html/HTMLMediaElement.cpp
> +++ b/qtwebkit/Source/WebCore/html/HTMLMediaElement.cpp
> @@ -540,6 +540,7 @@ void HTMLMediaElement::removedFrom(ContainerNode* insertionPoint)
>              pause();
>          if (m_isFullscreen)
>              exitFullscreen();
> +        m_player.clear();
>      }
> 
>      HTMLElement::removedFrom(insertionPoint);
> 
> Is this the right way to do it?
> otherwise, how to fix the issue?
> 

Clearing the player makes it lose all state and HTMLMediaElement::removedFrom is called when moving an element to a different place in the DOM, so I think this is not the correct way to fix this.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list