Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82c42ad3 authored by Andy Hung's avatar Andy Hung Committed by Automerger Merge Worker
Browse files

Merge "SoundPool: Fix channel mask reporting" am: 4b50dd4f

parents 405237f2 4b50dd4f
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -181,8 +181,11 @@ static status_t decode(int fd, int64_t offset, int64_t length,
                    format.get(), AMEDIAFORMAT_KEY_CHANNEL_COUNT, channelCount)) {
                return UNKNOWN_ERROR;
            }
            if (!AMediaFormat_getInt32(format.get(), AMEDIAFORMAT_KEY_CHANNEL_MASK,
                    (int32_t*) channelMask)) {
            int32_t mediaFormatChannelMask;
            if (AMediaFormat_getInt32(format.get(), AMEDIAFORMAT_KEY_CHANNEL_MASK,
                    &mediaFormatChannelMask)) {
                *channelMask = audio_channel_mask_from_media_format_mask(mediaFormatChannelMask);
            } else {
                *channelMask = AUDIO_CHANNEL_NONE;
            }
            *sizeInBytes = written;