mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
Bug 1496529 - P5. Don't unnecessarily wait on decoder to shutdown r=bryce
Depends on D7864 Differential Revision: https://phabricator.services.mozilla.com/D7865 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
2ae449a166
commit
26ace1a1c9
@ -157,14 +157,10 @@ WebrtcMediaDataDecoder::RegisterDecodeCompleteCallback(
|
||||
int32_t
|
||||
WebrtcMediaDataDecoder::Release()
|
||||
{
|
||||
RefPtr<ShutdownPromise> p =
|
||||
mDecoder->Flush()->Then(mTaskQueue,
|
||||
__func__,
|
||||
[this]() { return mDecoder->Shutdown(); },
|
||||
[this]() { return mDecoder->Shutdown(); });
|
||||
media::Await(do_AddRef(mThreadPool), p);
|
||||
RefPtr<MediaDataDecoder> decoder = mDecoder.forget();
|
||||
decoder->Flush()->Then(
|
||||
mTaskQueue, __func__, [decoder]() { decoder->Shutdown(); });
|
||||
|
||||
mDecoder = nullptr;
|
||||
mNeedKeyframe = true;
|
||||
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user