diff options
author | Moonchild <moonchild@palemoon.org> | 2019-07-11 14:56:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-11 14:56:41 +0000 |
commit | 04a7c6bb4e4048369e0a635dc02e9d83bbd59f87 (patch) | |
tree | cd580c19b66ce62987ece8df5d2ba7384c329502 /dom/media/webm/WebMDecoder.cpp | |
parent | dd924323c3cda022493cd78d42da190577be20cf (diff) | |
parent | 31addeaac8841867008699478ef55e1c1b3d68a7 (diff) | |
download | UXP-04a7c6bb4e4048369e0a635dc02e9d83bbd59f87.tar UXP-04a7c6bb4e4048369e0a635dc02e9d83bbd59f87.tar.gz UXP-04a7c6bb4e4048369e0a635dc02e9d83bbd59f87.tar.lz UXP-04a7c6bb4e4048369e0a635dc02e9d83bbd59f87.tar.xz UXP-04a7c6bb4e4048369e0a635dc02e9d83bbd59f87.zip |
Merge pull request #1174 from JeroenVreeken/master
Report matroska containers as supported and also support h.264 content in a matroska container file
Diffstat (limited to 'dom/media/webm/WebMDecoder.cpp')
-rw-r--r-- | dom/media/webm/WebMDecoder.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/dom/media/webm/WebMDecoder.cpp b/dom/media/webm/WebMDecoder.cpp index 9575d6e42..5cb943742 100644 --- a/dom/media/webm/WebMDecoder.cpp +++ b/dom/media/webm/WebMDecoder.cpp @@ -42,7 +42,10 @@ WebMDecoder::CanHandleMediaType(const nsACString& aMIMETypeExcludingCodecs, const bool isWebMAudio = aMIMETypeExcludingCodecs.EqualsASCII("audio/webm"); const bool isWebMVideo = aMIMETypeExcludingCodecs.EqualsASCII("video/webm"); - if (!isWebMAudio && !isWebMVideo) { + const bool isMatroskaAudio = aMIMETypeExcludingCodecs.EqualsASCII("audio/x-matroska") ; + const bool isMatroskaVideo = aMIMETypeExcludingCodecs.EqualsASCII("video/x-matroska") ; + + if (!isWebMAudio && !isWebMVideo && !isMatroskaAudio && !isMatroskaVideo) { return false; } @@ -63,7 +66,7 @@ WebMDecoder::CanHandleMediaType(const nsACString& aMIMETypeExcludingCodecs, } // Note: Only accept VP8/VP9 in a video content type, not in an audio // content type. - if (isWebMVideo && + if ((isWebMVideo || isMatroskaVideo) && (codec.EqualsLiteral("vp8") || codec.EqualsLiteral("vp8.0") || codec.EqualsLiteral("vp9") || codec.EqualsLiteral("vp9.0"))) { @@ -74,6 +77,11 @@ WebMDecoder::CanHandleMediaType(const nsACString& aMIMETypeExcludingCodecs, continue; } #endif + + if (IsH264CodecString(codec)) { + continue; + } + // Some unsupported codec. return false; } |