mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 15:27:32 +09:00
Make matroska mime type checking more consistent.
This commit is contained in:
parent
a960d679d5
commit
68c810a1ac
4 changed files with 10 additions and 5 deletions
|
|
@ -41,8 +41,11 @@ WebMDecoder::CanHandleMediaType(const nsACString& aMIMETypeExcludingCodecs,
|
|||
}
|
||||
|
||||
const bool isWebMAudio = aMIMETypeExcludingCodecs.EqualsASCII("audio/webm");
|
||||
const bool isWebMVideo = aMIMETypeExcludingCodecs.EqualsASCII("video/webm") || aMIMETypeExcludingCodecs.EqualsASCII("video/x-matroska") ;
|
||||
if (!isWebMAudio && !isWebMVideo) {
|
||||
const bool isWebMVideo = aMIMETypeExcludingCodecs.EqualsASCII("video/webm");
|
||||
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"))) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue