MediaPlayer: fix channel mask handling
The AAC decoder is publishing the decoded channel mask using the expected format for KEY_CHANNEL_MASK, which uses the Java AudioFormat mask definitions. The MediaPlayer implementation was treating published channel masks (when found in the decoded format) as using the native mask format, causing the "stereo Java mask" value of 0b1100 to be handled as AUDIO_CHANNEL_OUT_FRONT_CENTER | AUDIO_CHANNEL_OUT_LOW_FREQUENCY. The fix consists in converting from the AudioFormat format to the audio_channel_mask_t format, unless the two least significant bits are non-zero (for compatibility with legacy extractors). Bug: 238115866 Test: repro in bug playing RTSP stream w/ captions on Change-Id: Ie8b57e20927d90e45b0f69a23a6777af7a39794d
Loading
Please register or sign in to comment