stagefright: explicitly release extractor in StagefrightMetadataRetriever
Extractor dtor on media.extractor side happens asynchronously with the
dtor of StagefrightMetadataRetriever. If the extractor calls back into
the DataSource after mediaserver side released the reference to it, the
binder transaction could get stuck.
Adding an explicity release() and call it before StagefrightMetadataRetriever
continues to destruct the DataSource. Only implement it for MPEG4Extractor
to avoid impacting other extractors at this stage.
Also adding some code to aggressively release the extractor and data
source in HeifDecoderImpl to free up memory.
bug: 65463215
Change-Id: I84c442a1e010dd37a976af5453a353e43f672e22
7 files changed