Bug 1339204 - Adds VP9 and VP9.0 as supported types in the MP4Decoder r?cpearce draft
authorJay Harris <jharris@mozilla.com>
Tue, 14 Feb 2017 10:31:02 +1300
changeset 483152 af19493d1f9b13c86eef80e974715d12ded00dd3
parent 483151 a54cb3b39708d9005784a828ef0765318b6da69e
child 483153 8da5ef015bdd5fc8068c978a59aa362f791f75aa
child 483165 c278db5496122ed4d2396a1f3dafe0dbd17ce3ae
child 483169 24f7d388f1df89f3e47cc621b2cb054e805abf82
push id45236
push userbmo:jharris@mozilla.com
push dateMon, 13 Feb 2017 21:39:14 +0000
reviewerscpearce
bugs1339204
milestone54.0a1
Bug 1339204 - Adds VP9 and VP9.0 as supported types in the MP4Decoder r?cpearce MozReview-Commit-ID: 4vZGvb7nbVb
dom/media/fmp4/MP4Decoder.cpp
--- a/dom/media/fmp4/MP4Decoder.cpp
+++ b/dom/media/fmp4/MP4Decoder.cpp
@@ -127,16 +127,22 @@ MP4Decoder::IsSupportedType(const MediaC
         continue;
       }
       if (codec.EqualsLiteral("flac")) {
         trackInfos.AppendElement(
           CreateTrackInfoWithMIMETypeAndContainerTypeExtraParameters(
             NS_LITERAL_CSTRING("audio/flac"), aType));
         continue;
       }
+      if (codec.EqualsLiteral("vp9") || codec.EqualsLiteral("vp9.0")) {
+        trackInfos.AppendElement(
+          CreateTrackInfoWithMIMETypeAndContainerTypeExtraParameters(
+            NS_LITERAL_CSTRING("video/vp9"), aType));
+        continue;
+      }
       // Note: Only accept H.264 in a video content type, not in an audio
       // content type.
       if (IsWhitelistedH264Codec(codec) && isVideo) {
         trackInfos.AppendElement(
           CreateTrackInfoWithMIMETypeAndContainerTypeExtraParameters(
             NS_LITERAL_CSTRING("video/avc"), aType));
         continue;
       }