Bug 875483 - YouTube HTML5 Playback hangs Firefox. r=tterribe
authorAndrea Marchesini <amarchesini@mozilla.com>
Fri, 24 May 2013 14:04:20 +0200
changeset 132829 97aa3da590012531389e0f58b7310119ba31b01c
parent 132828 fe53a0780c6fa100ae2b96b773c07c278da1d0f0
child 132854 3d76661cd0aaaa498028b197ccb25068dd5bdc04
push id24717
push userdgottwald@mozilla.com
push dateFri, 24 May 2013 12:04:35 +0000
treeherdermozilla-central@97aa3da59001 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstterribe
bugs875483
milestone24.0a1
first release with
nightly mac
97aa3da59001 / 24.0a1 / 20130524050555 / files
nightly win32
97aa3da59001 / 24.0a1 / 20130524050555 / files
nightly win64
97aa3da59001 / 24.0a1 / 20130524050555 / files
nightly linux32
nightly linux64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly mac
nightly win32
nightly win64
Bug 875483 - YouTube HTML5 Playback hangs Firefox. r=tterribe
content/html/content/src/HTMLMediaElement.cpp
--- a/content/html/content/src/HTMLMediaElement.cpp
+++ b/content/html/content/src/HTMLMediaElement.cpp
@@ -1695,16 +1695,20 @@ void HTMLMediaElement::SetMutedInternal(
     mAudioStream->SetVolume(effectiveVolume);
   } else if (mSrcStream) {
     GetSrcMediaStream()->SetAudioOutputVolume(this, effectiveVolume);
   }
 }
 
 NS_IMETHODIMP HTMLMediaElement::SetMuted(bool aMuted)
 {
+  if (aMuted == Muted()) {
+    return NS_OK;
+  }
+
   if (aMuted) {
     SetMutedInternal(mMuted | MUTED_BY_CONTENT);
   } else {
     SetMutedInternal(mMuted & ~MUTED_BY_CONTENT);
   }
 
   DispatchAsyncEvent(NS_LITERAL_STRING("volumechange"));
   return NS_OK;