Bug 1360123 P3 - while shutting down a MediaDecoder, ask its owner to remove all media tracks; r=jwwang

MozReview-Commit-ID: 6s84iyXJQ9k

--HG--
extra : rebase_source : 443d6fafd8c17d02dba6ba0054abbb473079545a
This commit is contained in:
Kaku Kuo 2017-04-18 15:46:05 +08:00
parent dab014bd99
commit b249c9b732

View file

@ -503,6 +503,9 @@ MediaDecoder::Shutdown()
mResource->Close(); mResource->Close();
} }
// Ask the owner to remove its audio/video tracks.
GetOwner()->RemoveMediaTracks();
ChangeState(PLAY_STATE_SHUTDOWN); ChangeState(PLAY_STATE_SHUTDOWN);
mOwner = nullptr; mOwner = nullptr;
} }