Bug 1315567: P3. Expose flac codec as being available in mp4. r=gerald
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 07 Nov 2016 10:57:28 +1100
changeset 348044 bfaa975490cfbe35626cb9a3b783844266d97769
parent 348043 d5ae76734cb6f12b2a0eba3a1d3b306a18af0adc
child 348045 eb1b930cef78eac6198213ccc013fd5c40519f51
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1315567
milestone52.0a1
Bug 1315567: P3. Expose flac codec as being available in mp4. r=gerald MozReview-Commit-ID: 7C6W1KGQ1jE
dom/media/fmp4/MP4Decoder.cpp
--- a/dom/media/fmp4/MP4Decoder.cpp
+++ b/dom/media/fmp4/MP4Decoder.cpp
@@ -136,16 +136,22 @@ MP4Decoder::CanHandleMediaType(const Med
         continue;
       }
       if (codec.EqualsLiteral("opus")) {
         trackInfos.AppendElement(
           CreateTrackInfoWithMIMETypeAndContentTypeExtraParameters(
             NS_LITERAL_CSTRING("audio/opus"), aType));
         continue;
       }
+      if (codec.EqualsLiteral("flac")) {
+        trackInfos.AppendElement(
+          CreateTrackInfoWithMIMETypeAndContentTypeExtraParameters(
+            NS_LITERAL_CSTRING("audio/flac"), aType));
+        continue;
+      }
       // Note: Only accept H.264 in a video content type, not in an audio
       // content type.
       if (IsWhitelistedH264Codec(codec) && isMP4Video) {
         trackInfos.AppendElement(
           CreateTrackInfoWithMIMETypeAndContentTypeExtraParameters(
             NS_LITERAL_CSTRING("video/avc"), aType));
         continue;
       }