Bug 1132757 - Don't crash if we call WMFVideoMFTManager after we've initiated shutdown. r=cpearce

This commit is contained in:
Matt Woodrow 2015-02-27 11:46:10 +13:00
parent 8c48f9f304
commit d9b857ba4f

View File

@ -234,6 +234,10 @@ WMFVideoMFTManager::Init()
HRESULT
WMFVideoMFTManager::Input(mp4_demuxer::MP4Sample* aSample)
{
if (!mDecoder) {
// This can happen during shutdown.
return E_FAIL;
}
if (mStreamType != VP8 && mStreamType != VP9) {
// We must prepare samples in AVC Annex B.
if (!mp4_demuxer::AnnexB::ConvertSampleToAnnexB(aSample)) {