Bug 1116626 - Null check mDecoder in AutoNotifyDecoded since it might have been shutdown already. r=karlt

This commit is contained in:
Matt Woodrow 2015-01-12 09:41:50 +13:00
parent 94b8f7e852
commit ec6db05d59

View File

@ -143,7 +143,9 @@ public:
AutoNotifyDecoded(AbstractMediaDecoder* aDecoder, uint32_t& aParsed, uint32_t& aDecoded)
: mDecoder(aDecoder), mParsed(aParsed), mDecoded(aDecoded) {}
~AutoNotifyDecoded() {
mDecoder->NotifyDecodedFrames(mParsed, mDecoded);
if (mDecoder) {
mDecoder->NotifyDecodedFrames(mParsed, mDecoded);
}
}
private:
AbstractMediaDecoder* mDecoder;