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)
commit565467f98924fd15a83eff0877860151c2bcc474
treefc4ed8acef09494f8a96cd72024219ca2219b610
parent1f4f138c7180c2b7df19c136cccf297dc4a369dd
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: https://svn.webkit.org/repository/webkit/trunk@166722 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp