Bug 1315567: P1. Remove invalid test. r=gerald
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 07 Nov 2016 12:56:55 +1100
changeset 321377 d7fec66162b778ce395f77045e0779a6c79ed6f8
parent 321376 63be72bf8bbd66a07c64e29a5deb52c1b3a2f411
child 321378 d5ae76734cb6f12b2a0eba3a1d3b306a18af0adc
push id21
push usermaklebus@msu.edu
push dateThu, 01 Dec 2016 06:22:08 +0000
reviewersgerald
bugs1315567
milestone52.0a1
Bug 1315567: P1. Remove invalid test. r=gerald audio/opus is a codec type, not a MP4 container one. aType can never be audio/opus MozReview-Commit-ID: E8tONlF4COA
dom/media/fmp4/MP4Decoder.cpp
--- a/dom/media/fmp4/MP4Decoder.cpp
+++ b/dom/media/fmp4/MP4Decoder.cpp
@@ -84,33 +84,32 @@ MP4Decoder::CanHandleMediaType(const Med
   if (!IsEnabled()) {
     return false;
   }
 
   // Whitelist MP4 types, so they explicitly match what we encounter on
   // the web, as opposed to what we use internally (i.e. what our demuxers
   // etc output).
   const bool isMP4Audio = aType.GetMIMEType().EqualsASCII("audio/mp4") ||
-                          aType.GetMIMEType().EqualsASCII("audio/x-m4a") ||
-                          aType.GetMIMEType().EqualsASCII("audio/opus");
+                          aType.GetMIMEType().EqualsASCII("audio/x-m4a");
   const bool isMP4Video =
   // On B2G, treat 3GPP as MP4 when Gonk PDM is available.
 #ifdef MOZ_GONK_MEDIACODEC
       aType.GetMIMEType().EqualsASCII(VIDEO_3GPP) ||
 #endif
       aType.GetMIMEType().EqualsASCII("video/mp4") ||
       aType.GetMIMEType().EqualsASCII("video/quicktime") ||
       aType.GetMIMEType().EqualsASCII("video/x-m4v");
   if (!isMP4Audio && !isMP4Video) {
     return false;
   }
 
   nsTArray<UniquePtr<TrackInfo>> trackInfos;
   if (aType.GetCodecs().IsEmpty()) {
-    // No codecs specified. Assume AAC/H.264
+    // No codecs specified. Assume H.264
     if (isMP4Audio) {
       trackInfos.AppendElement(
         CreateTrackInfoWithMIMETypeAndContentTypeExtraParameters(
           NS_LITERAL_CSTRING("audio/mp4a-latm"), aType));
     } else {
       MOZ_ASSERT(isMP4Video);
       trackInfos.AppendElement(
         CreateTrackInfoWithMIMETypeAndContentTypeExtraParameters(