NuPlayer: Only open audio sink if format is valid
In offload use-cases, openAudioSink() is called on every iteration of kWhatScanSources in case the audio format has changed. Within this call, createPCMMetaFromSource() copies the required keys from the actual source meta. convertMetaDataToMessage() is applied to this new result, but it asserts if specific audio keys are not found. If the source meta is NULL, there are no keys to propagate to the PCM meta, and this assertion is triggered. Only call openAudioSink() for offloaded audio if the source format is non-NULL to avoid this case. Also fix a logging bug & increase the logging level to flag when a NULL meta is passed to createPCMMetaFromSource(). CRs-Fixed: 799640 Change-Id: Ie87261e3c8f632b2a4f52d0048c3287d83b03ff9
Loading
Please register or sign in to comment