summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dom/media/VideoUtils.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/dom/media/VideoUtils.cpp b/dom/media/VideoUtils.cpp
index 66a6d6f9b7..cc8d561460 100644
--- a/dom/media/VideoUtils.cpp
+++ b/dom/media/VideoUtils.cpp
@@ -641,15 +641,25 @@ IsAACCodecString(const nsAString& aCodec)
bool
IsVP8CodecString(const nsAString& aCodec)
{
+ uint8_t profile = 0;
+ uint8_t level = 0;
+ uint8_t bitDepth = 0;
return aCodec.EqualsLiteral("vp8") ||
- aCodec.EqualsLiteral("vp8.0");
+ aCodec.EqualsLiteral("vp8.0") ||
+ (StartsWith(NS_ConvertUTF16toUTF8(aCodec), "vp08") &&
+ ExtractVPXCodecDetails(aCodec, profile, level, bitDepth));
}
bool
IsVP9CodecString(const nsAString& aCodec)
{
+ uint8_t profile = 0;
+ uint8_t level = 0;
+ uint8_t bitDepth = 0;
return aCodec.EqualsLiteral("vp9") ||
- aCodec.EqualsLiteral("vp9.0");
+ aCodec.EqualsLiteral("vp9.0") ||
+ (StartsWith(NS_ConvertUTF16toUTF8(aCodec), "vp09") &&
+ ExtractVPXCodecDetails(aCodec, profile, level, bitDepth));
}
#ifdef MOZ_AV1