Bug 1329104 - Shutdown context used for WebM alpha decoding. r?jya
Fixes leak due to context used for decoding alpha in WebM videos not shutting
down.
MozReview-Commit-ID: 5ZWHM7xvxiV
--- a/dom/media/platforms/agnostic/VPXDecoder.cpp
+++ b/dom/media/platforms/agnostic/VPXDecoder.cpp
@@ -83,16 +83,17 @@ VPXDecoder::~VPXDecoder()
{
MOZ_COUNT_DTOR(VPXDecoder);
}
void
VPXDecoder::Shutdown()
{
vpx_codec_destroy(&mVPX);
+ vpx_codec_destroy(&mVPXAlpha);
}
RefPtr<MediaDataDecoder::InitPromise>
VPXDecoder::Init()
{
if (NS_FAILED(InitContext(&mVPX, mInfo, mCodec))) {
return VPXDecoder::InitPromise::CreateAndReject(NS_ERROR_DOM_MEDIA_FATAL_ERR,
__func__);