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

Commit d0d7f876 authored by Steve Kondik's avatar Steve Kondik
Browse files

stagefright: Fix audio codec fallthru

 * We shouldn't return an error from setAudioFormat unless it's
   really an error since fallthru is necessary.
 * We don't even need to do this, since the component name is
   checked before calling into mm-parser or FFMPEG.
 * Fixes Vorbis decoding after FFMPEG patch.

Change-Id: I4871c62044c6693e5698119dee3a10c20c26e2c7
parent b94e3fb3
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1595,7 +1595,6 @@ status_t ACodec::configureCodec(
                setupRawAudioFormat(kPortIndexInput, sampleRate, numChannels);
            }
        }
        err = ERROR_UNSUPPORTED;
#ifdef ENABLE_AV_ENHANCEMENTS
        if (!strncmp(mComponentName.c_str(), "OMX.qcom.", 9)) {
            err = ExtendedCodec::setAudioFormat(
+2 −4
Original line number Diff line number Diff line
@@ -397,8 +397,6 @@ status_t ExtendedCodec::setAudioFormat(
        CHECK(msg->findInt32("channel-count", &numChannels));
        CHECK(msg->findInt32("sample-rate", &sampleRate));
        err = setAMRWBPLUSFormat(numChannels, sampleRate, OMXhandle, nodeID);
    } else {
        err = BAD_VALUE;
    }
    return err;
}
@@ -1240,7 +1238,7 @@ namespace android {
        ARG_TOUCH(OMXhandle);
        ARG_TOUCH(nodeID);
        ARG_TOUCH(isEncoder);
        return ERROR_UNSUPPORTED;
        return OK;
    }

    status_t ExtendedCodec::setAudioFormat(
@@ -1252,7 +1250,7 @@ namespace android {
        ARG_TOUCH(OMXhandle);
        ARG_TOUCH(nodeID);
        ARG_TOUCH(isEncoder);
        return ERROR_UNSUPPORTED;
        return OK;
    }

    status_t ExtendedCodec::setVideoFormat(
+0 −2
Original line number Diff line number Diff line
@@ -324,8 +324,6 @@ status_t FFMPEGSoftCodec::setAudioFormat(
        if (err != OK) {
            ALOGE("setFFmpegAudioFormat() failed (err = %d)", err);
        }
    } else {
        err = BAD_VALUE;
    }

    return err;
+2 −2
Original line number Diff line number Diff line
@@ -788,7 +788,7 @@ status_t OMXCodec::configureCodec(const sp<MetaData> &meta) {
            CHECK(meta->findInt32(kKeySampleRate, &sampleRate));
            setRawAudioFormat(kPortIndexInput, sampleRate, numChannels);
        }
        status_t err = ERROR_UNSUPPORTED;
        status_t err = OK;

#ifdef ENABLE_AV_ENHANCEMENTS
        if (!strncmp(mComponentName, "OMX.qcom.", 9)) {
@@ -796,7 +796,7 @@ status_t OMXCodec::configureCodec(const sp<MetaData> &meta) {
                    meta, mMIME, mOMX, mNode, mIsEncoder);
        }
#endif
        if (OK != err && !strncmp(mComponentName, "OMX.ffmpeg.", 11)) {
        if (!strncmp(mComponentName, "OMX.ffmpeg.", 11)) {
            err = FFMPEGSoftCodec::setAudioFormat(
                    meta, mMIME, mOMX, mNode, mIsEncoder);
        }