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

Commit fae47fd0 authored by Andreas Huber's avatar Andreas Huber Committed by Android Git Automerger
Browse files

am 28fadef2: am 3c78a1b5: Return a runtime error instead of asserting if the...

am 28fadef2: am 3c78a1b5: Return a runtime error instead of asserting if the AACDecoder is passed an unsupported config.

Merge commit '28fadef2' into kraken

* commit '28fadef2':
  Return a runtime error instead of asserting if the AACDecoder is passed an unsupported config.
parents 485b800e 28fadef2
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -778,7 +778,12 @@ status_t AwesomePlayer::initAudioDecoder() {
            }
        }

        mAudioSource->start();
        status_t err = mAudioSource->start();

        if (err != OK) {
            mAudioSource.clear();
            return err;
        }
    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_QCELP)) {
        // For legacy reasons we're simply going to ignore the absence
        // of an audio decoder for QCELP instead of aborting playback
+4 −2
Original line number Diff line number Diff line
@@ -90,8 +90,10 @@ status_t AACDecoder::start(MetaData *params) {
        mConfig->pOutputBuffer_plus = NULL;
        mConfig->repositionFlag = false;

        CHECK_EQ(PVMP4AudioDecoderConfig(mConfig, mDecoderBuf),
                 MP4AUDEC_SUCCESS);
        if (PVMP4AudioDecoderConfig(mConfig, mDecoderBuf)
                != MP4AUDEC_SUCCESS) {
            return ERROR_UNSUPPORTED;
        }
    }

    mSource->start();