Leaving a streaming movie by going "Back" keeps playing the audio
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Apr 2014 16:29:32 +0000 (16:29 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Apr 2014 16:29:32 +0000 (16:29 +0000)
commita6d620f12306981a030ccb9184116cc37a12ce86
treefc4ed8acef09494f8a96cd72024219ca2219b610
parentcdd33103b66c36a9ece3b5bdf02e12b8d7aa085a
Leaving a streaming movie by going "Back" keeps playing the audio
https://bugs.webkit.org/show_bug.cgi?id=131149

Reviewed by Eric Carlson.

When stopping a HTMLMediaElement, call userCancelledLoad() (which clears the
MediaPlayer) only after calling setPausedInternal() (which pauses the MediaPlayer).
Previously, and in the reverse order, the MediaPlayer would never get a chance to pause
before being cleared. There is an underlying error with the QTKit media engine which
is causing it to continue playing even after its last reference is released, but this
does fix the symptom of playback continuing even after stopping.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::stop):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166722 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp