Fix issues crashing with Fatal signal when calling getFormat

when playing multimedia file, GenericSource::getTrackInfo run in the
NuPlayerDriver thread, and GenericSource::getFormatMeta run in the
Generic thread. they would access the critical resource which is
mMetaData in IMediaSource. There is no lock to protect mMetaData.
Occasionally, SIGSEGV occurs when mMetaData point to a new object.

Instead getting trackInfo in Generic thread.

Bug: 34220591
Signed-off-by: qinzhichao <>
2 files changed