summaryrefslogtreecommitdiffstats
path: root/dom/media/platforms/agnostic/VPXDecoder.cpp
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-08 21:10:31 -0500
committertrav90 <travawine@palemoon.org>2018-10-08 21:10:31 -0500
commit5a83ed9ebacfa2bd653953b359dd5456817b03c3 (patch)
tree986180ad48bd0490ef9c12e4c710469741ec1c87 /dom/media/platforms/agnostic/VPXDecoder.cpp
parentae3cdb4be3cfe1faccf1d8a74928391570952609 (diff)
downloadUXP-5a83ed9ebacfa2bd653953b359dd5456817b03c3.tar
UXP-5a83ed9ebacfa2bd653953b359dd5456817b03c3.tar.gz
UXP-5a83ed9ebacfa2bd653953b359dd5456817b03c3.tar.lz
UXP-5a83ed9ebacfa2bd653953b359dd5456817b03c3.tar.xz
UXP-5a83ed9ebacfa2bd653953b359dd5456817b03c3.zip
[vpx] Store VPXDecoder codec as an enum
Use the enum we already have here instead of converting to an int when we pass it around, giving us better type checking.
Diffstat (limited to 'dom/media/platforms/agnostic/VPXDecoder.cpp')
-rw-r--r--dom/media/platforms/agnostic/VPXDecoder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/dom/media/platforms/agnostic/VPXDecoder.cpp b/dom/media/platforms/agnostic/VPXDecoder.cpp
index 77c81b51b..42bb86020 100644
--- a/dom/media/platforms/agnostic/VPXDecoder.cpp
+++ b/dom/media/platforms/agnostic/VPXDecoder.cpp
@@ -22,7 +22,7 @@ namespace mozilla {
using namespace gfx;
using namespace layers;
-static int MimeTypeToCodec(const nsACString& aMimeType)
+static VPXDecoder::Codec MimeTypeToCodec(const nsACString& aMimeType)
{
if (aMimeType.EqualsLiteral("video/webm; codecs=vp8")) {
return VPXDecoder::Codec::VP8;
@@ -31,7 +31,7 @@ static int MimeTypeToCodec(const nsACString& aMimeType)
} else if (aMimeType.EqualsLiteral("video/vp9")) {
return VPXDecoder::Codec::VP9;
}
- return -1;
+ return VPXDecoder::Codec::Unknown;
}
VPXDecoder::VPXDecoder(const CreateDecoderParams& aParams)