зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1333979 - Adds a check in the WidevineVideoDecoder before shutting down r=cpearce
DeinitializeDecoder will now only be called if InitializeDecoder has been called first MozReview-Commit-ID: 93WexomWp92 --HG-- extra : rebase_source : 96dfa5666041340d56fbfce7a46fb7f8f67181dc
This commit is contained in:
Родитель
ff0d7b7db5
Коммит
7c7fa081d8
|
@ -383,10 +383,18 @@ void
|
|||
WidevineVideoDecoder::DecodingComplete()
|
||||
{
|
||||
Log("WidevineVideoDecoder::DecodingComplete()");
|
||||
|
||||
if (mCDMWrapper) {
|
||||
CDM()->DeinitializeDecoder(kStreamTypeVideo);
|
||||
// mCallback will be null if the decoder has not been fully initialized.
|
||||
if (mCallback) {
|
||||
CDM()->DeinitializeDecoder(kStreamTypeVideo);
|
||||
} else {
|
||||
Log("WideVineDecoder::DecodingComplete() Decoder was not fully initialized!");
|
||||
}
|
||||
|
||||
mCDMWrapper = nullptr;
|
||||
}
|
||||
|
||||
// Release that corresponds to AddRef() in constructor.
|
||||
Release();
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ private:
|
|||
RefPtr<CDMWrapper> mCDMWrapper;
|
||||
RefPtr<MediaByteBuffer> mExtraData;
|
||||
RefPtr<MediaByteBuffer> mAnnexB;
|
||||
GMPVideoDecoderCallback* mCallback;
|
||||
GMPVideoDecoderCallback* mCallback = nullptr;
|
||||
std::map<uint64_t, uint64_t> mFrameDurations;
|
||||
bool mSentInput;
|
||||
GMPVideoCodecType mCodecType;
|
||||
|
|
Загрузка…
Ссылка в новой задаче