зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1345342: Cancel pending requests. r=jya
If the pending first frame decoding was cancelled, the next call to decode could lead to a crash. MozReview-Commit-ID: 6Q4eKUzqOly --HG-- extra : rebase_source : 3640a2edd07fdbd4811295c0088a4086ac579b26
This commit is contained in:
Родитель
26c7227c5e
Коммит
5e8ee8b868
|
@ -131,6 +131,10 @@ H264Converter::Decode(MediaRawData* aSample)
|
|||
RefPtr<MediaDataDecoder::FlushPromise>
|
||||
H264Converter::Flush()
|
||||
{
|
||||
mDecodePromiseRequest.DisconnectIfExists();
|
||||
mFlushRequest.DisconnectIfExists();
|
||||
mShutdownRequest.DisconnectIfExists();
|
||||
mDecodePromise.RejectIfExists(NS_ERROR_DOM_MEDIA_CANCELED, __func__);
|
||||
mNeedKeyframe = true;
|
||||
if (mDecoder) {
|
||||
return mDecoder->Flush();
|
||||
|
|
Загрузка…
Ссылка в новой задаче