mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 18:08:58 +00:00
Bug 1190379: Use AndroidDecoderModule for VP8/9. r=jya
This commit is contained in:
parent
8da0ca76c8
commit
bf5e1cfc83
@ -37,7 +37,13 @@ namespace mozilla {
|
||||
static MediaCodec::LocalRef CreateDecoder(const nsACString& aMimeType)
|
||||
{
|
||||
MediaCodec::LocalRef codec;
|
||||
NS_ENSURE_SUCCESS(MediaCodec::CreateDecoderByType(PromiseFlatCString(aMimeType).get(), &codec), nullptr);
|
||||
nsACString type = *aMimeType;
|
||||
if (aMimeType.EqualsLiteral("video/webm; codecs=vp8")) {
|
||||
type = "video/x-vnd.on2.vp8";
|
||||
} else if (aMimeType.EqualsLiteral("video/webm; codecs=vp9")) {
|
||||
type = "video/x-vnd.on2.vp9";
|
||||
}
|
||||
NS_ENSURE_SUCCESS(MediaCodec::CreateDecoderByType(PromiseFlatCString(type).get(), &codec), nullptr);
|
||||
return codec;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user