Bug 1147226 - Ensure media.eme.mse-only is honoured in HTMLMediaElement::MetadataLoaded(). r=edwin
authorChris Pearce <cpearce@mozilla.com>
Wed, 25 Mar 2015 15:00:26 +1300
changeset 235486 3779bb7888d30232e88dc0d71afa6061ba1be85b
parent 235485 bb0db528a2c4fb1d155ea108d30870bba86263c2
child 235487 0b02e059cf6031ff7047d3075b9e0ed40ab89a33
push id57440
push usercpearce@mozilla.com
push dateWed, 25 Mar 2015 02:01:05 +0000
treeherdermozilla-inbound@3779bb7888d3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersedwin
bugs1147226
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1147226 - Ensure media.eme.mse-only is honoured in HTMLMediaElement::MetadataLoaded(). r=edwin
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -3079,17 +3079,17 @@ void HTMLMediaElement::MetadataLoaded(co
     DispatchAsyncEvent(NS_LITERAL_STRING("resize"));
   }
   DispatchAsyncEvent(NS_LITERAL_STRING("loadedmetadata"));
   if (mDecoder && mDecoder->IsTransportSeekable() && mDecoder->IsMediaSeekable()) {
     ProcessMediaFragmentURI();
     mDecoder->SetFragmentEndTime(mFragmentEnd);
   }
   if (mIsEncrypted) {
-    if (!mMediaSource) {
+    if (!mMediaSource && Preferences::GetBool("media.eme.mse-only", true)) {
       DecodeError();
       return;
     }
 
 #ifdef MOZ_EME
     DispatchEncrypted(aInfo->mCrypto.mInitData, aInfo->mCrypto.mType);
 #endif
   }