Bug 1248570: Allow WAV into media element. r=lchristie
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 17 Feb 2016 00:22:06 +1100
changeset 284467 b3f7abd15aeb8fb8934fb7fbf0448e9a709729df
parent 284466 9f1df78b4831a7310e3299ea8830d8b5735f17e1
child 284468 283a51c2b59c59ead46413b3262cc6844bb388bb
push id71976
push userjyavenard@mozilla.com
push dateWed, 17 Feb 2016 04:47:59 +0000
treeherdermozilla-inbound@b3f7abd15aeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslchristie
bugs1248570
milestone47.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 1248570: Allow WAV into media element. r=lchristie MozReview-Commit-ID: AKIQq9EyCC6
dom/media/DecoderTraits.cpp
--- a/dom/media/DecoderTraits.cpp
+++ b/dom/media/DecoderTraits.cpp
@@ -339,24 +339,16 @@ IsWAVSupportedType(const nsACString& aTy
                    const nsAString& aCodecs = EmptyString())
 {
   return WaveDecoder::CanHandleMediaType(aType, aCodecs);
 }
 
 /* static */
 bool DecoderTraits::ShouldHandleMediaType(const char* aMIMEType)
 {
-  if (IsWaveType(nsDependentCString(aMIMEType))) {
-    // We should not return true for Wave types, since there are some
-    // Wave codecs actually in use in the wild that we don't support, and
-    // we should allow those to be handled by plugins or helper apps.
-    // Furthermore people can play Wave files on most platforms by other
-    // means.
-    return false;
-  }
   return CanHandleMediaType(aMIMEType, false, EmptyString()) != CANPLAY_NO;
 }
 
 /* static */
 CanPlayStatus
 DecoderTraits::CanHandleCodecsType(const char* aMIMEType,
                                    const nsAString& aRequestedCodecs)
 {
@@ -689,16 +681,17 @@ bool DecoderTraits::IsSupportedInVideoDo
 #ifdef MOZ_ANDROID_OMX
     (MediaDecoder::IsAndroidMediaEnabled() && IsAndroidMediaType(aType)) ||
 #endif
 #ifdef MOZ_FMP4
     IsMP4SupportedType(aType) ||
 #endif
     IsMP3SupportedType(aType) ||
     IsAACSupportedType(aType) ||
+    IsWAVSupportedType(aType) ||
 #ifdef MOZ_DIRECTSHOW
     IsDirectShowSupportedType(aType) ||
 #endif
 #ifdef NECKO_PROTOCOL_rtsp
     IsRtspSupportedType(aType) ||
 #endif
     false;
 }