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

Commit d5dee706 authored by Amit Shekhar's avatar Amit Shekhar Committed by Steve Kondik
Browse files

frameworks/av: fix channelmask and source format for pcm files

-Update channel mask from channel count if parser reports channel mask to be 0
-Update source format for each buffer by extending call to setPcmFormat when
 aggregation is not done

Change-Id: I1f4ce07e3e784d85e63be03a69ac1395bfa913e2
CRs-Fixed: 948222
parent e93c7cc0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -224,6 +224,7 @@ sp<ABuffer> NuPlayer::DecoderPassThrough::aggregateBuffer(
    } else {
        // decided not to aggregate
        aggregate = accessUnit;
        setPcmFormat(aggregate->meta());
    }

    return aggregate;
+1 −1
Original line number Diff line number Diff line
@@ -893,7 +893,7 @@ bool canOffloadStream(const sp<MetaData>& meta, bool hasVideo,
    info.sample_rate = srate;

    int32_t cmask = 0;
    if (!meta->findInt32(kKeyChannelMask, &cmask)) {
    if (!meta->findInt32(kKeyChannelMask, &cmask) || 0 == cmask) {
        ALOGV("track of type '%s' does not publish channel mask", mime);

        // Try a channel count instead