Bug 589048 - Destroy vpx_codec_ctx when destroying nsWebMReader. r=doublec, a=roc

This commit is contained in:
Matthew Gregan 2010-08-23 14:50:43 +12:00
parent b1ef0bf840
commit 9deec45efe

View File

@ -133,6 +133,8 @@ nsWebMReader::~nsWebMReader()
mVideoPackets.Reset();
mAudioPackets.Reset();
vpx_codec_destroy(&mVP8);
vorbis_block_clear(&mVorbisBlock);
vorbis_dsp_clear(&mVorbisDsp);
vorbis_info_clear(&mVorbisInfo);
@ -143,7 +145,7 @@ nsWebMReader::~nsWebMReader()
nsresult nsWebMReader::Init()
{
if(vpx_codec_dec_init(&mVP8, &vpx_codec_vp8_dx_algo, NULL, 0)) {
if (vpx_codec_dec_init(&mVP8, &vpx_codec_vp8_dx_algo, NULL, 0)) {
return NS_ERROR_FAILURE;
}