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

Commit 1a4c727b authored by Pavan Chikkala's avatar Pavan Chikkala Committed by Gerrit Code Review
Browse files

audio: fallback to SW decoder for video clips

- When Tunnel Output is failed to be selected for video clips
  with MP3/AAC, Playabck is not switched to SW Decoder

- Fix is to switch to SW deocoder

CRs-Fixed: 816458

Change-Id: Iffe7ead33be46072f1de622d6e6dfc6649a29e18
parent 38a308c9
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -1127,10 +1127,10 @@ status_t AwesomePlayer::play_l() {
            status_t err = startAudioPlayer_l(
                    false /* sendErrorNotification */);

#ifndef QCOM_DIRECTTRACK
            if ((err != OK) && mOffloadAudio) {
#else
#ifdef QCOM_DIRECTTRACK
            if ((err != OK) && (mOffloadAudio || mIsTunnelAudio)) {
#else
            if ((err != OK) && mOffloadAudio) {
#endif
                 err = fallbackToSWDecoder();
            }
@@ -2424,7 +2424,11 @@ void AwesomePlayer::onVideoEvent() {

    if (mAudioPlayer != NULL && !(mFlags & (AUDIO_RUNNING | SEEK_PREVIEW))) {
        status_t err = startAudioPlayer_l(false /* sendErrorNotification */);
#ifdef QCOM_DIRECTTRACK
        if ((err != OK) && (mOffloadAudio || mIsTunnelAudio)) {
#else
        if ((err != OK) && mOffloadAudio) {
#endif
            err = fallbackToSWDecoder();
        }