Bug 1490877: Make codecs=av01* mimetypes work with MSE. r=jya a=pascalc
authorThomas Daede <daede003@umn.edu>
Thu, 13 Sep 2018 07:55:17 +0000
changeset 489854 6ad54436118a
parent 489853 08ffdcf76ece
child 489855 dd935a08ff4a
push id9802
push userncsoregi@mozilla.com
push date2018-09-14 19:50 +0000
treeherdermozilla-beta@dd935a08ff4a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya, pascalc
bugs1490877
milestone63.0
Bug 1490877: Make codecs=av01* mimetypes work with MSE. r=jya a=pascalc While the MP4 parser correctly handles the av01* codec string, it is then converted to a video/av01* mimetype to search for a PDM. The libaom PDM only accepts video/av1, so always produce a video/av1 MIME type from a codecs=av01 string. Differential Revision: https://phabricator.services.mozilla.com/D5744
dom/media/mp4/MP4Decoder.cpp
--- a/dom/media/mp4/MP4Decoder.cpp
+++ b/dom/media/mp4/MP4Decoder.cpp
@@ -116,17 +116,17 @@ MP4Decoder::GetTracksInfo(const MediaCon
       }
       tracks.AppendElement(std::move(trackInfo));
       continue;
     }
 #ifdef MOZ_AV1
     if (IsAV1CodecString(codec)) {
       tracks.AppendElement(
         CreateTrackInfoWithMIMETypeAndContainerTypeExtraParameters(
-          NS_LITERAL_CSTRING("video/") + NS_ConvertUTF16toUTF8(codec), aType));
+          NS_LITERAL_CSTRING("video/av1"), aType));
       continue;
     }
 #endif
     if (isVideo && IsWhitelistedH264Codec(codec)) {
       auto trackInfo =
         CreateTrackInfoWithMIMETypeAndContainerTypeExtraParameters(
           NS_LITERAL_CSTRING("video/avc"), aType);
       uint8_t profile = 0, constraint = 0, level = 0;