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

Commit 760886a1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "NuPlayer: Only open audio sink if format is valid"

parents 348a473b b4605e57
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -728,8 +728,10 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
                if (mOffloadAudio) {
                    // open audio sink early under offload mode.
                    sp<AMessage> format = mSource->getFormat(true /*audio*/);
                    if (format != NULL) {
                        openAudioSink(format, true /*offloadOnly*/);
                    }
                }
                instantiateDecoder(true, &mAudioDecoder);
            }

+1 −2
Original line number Diff line number Diff line
@@ -1858,7 +1858,6 @@ bool ExtendedUtils::pcmOffloadException(const char* const mime) {
sp<MetaData> ExtendedUtils::createPCMMetaFromSource(
                const sp<MetaData> &sMeta)
{

    sp<MetaData> tPCMMeta = new MetaData;
    //hard code as RAW
    tPCMMeta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_RAW);
@@ -1868,7 +1867,7 @@ sp<MetaData> ExtendedUtils::createPCMMetaFromSource(
    tPCMMeta->setInt32(kKeySampleBits, 16);

    if (sMeta == NULL) {
        ALOGV("%s: no meta returning dummy meta");
        ALOGW("no meta returning dummy meta");
        return tPCMMeta;
    }