From 1b0277eca5dc82d66a962aa55b8783be1efdb83b Mon Sep 17 00:00:00 2001 From: trav90 Date: Sat, 20 Oct 2018 17:40:24 -0500 Subject: [PATCH] Add support for AV1 in MP4 --- dom/media/fmp4/MP4Decoder.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dom/media/fmp4/MP4Decoder.cpp b/dom/media/fmp4/MP4Decoder.cpp index 4cf07ddbd6..e24680fff2 100644 --- a/dom/media/fmp4/MP4Decoder.cpp +++ b/dom/media/fmp4/MP4Decoder.cpp @@ -147,6 +147,14 @@ MP4Decoder::CanHandleMediaType(const MediaContentType& aType, NS_LITERAL_CSTRING("audio/flac"), aType)); continue; } +#ifdef MOZ_AV1 + if (IsAV1CodecString(codec)) { + trackInfos.AppendElement( + CreateTrackInfoWithMIMETypeAndContentTypeExtraParameters( + NS_LITERAL_CSTRING("video/av1"), aType)); + continue; + } +#endif // Note: Only accept H.264 in a video content type, not in an audio // content type. if (IsWhitelistedH264Codec(codec) && isMP4Video) {