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

Commit 65cca377 authored by Ramjee Singh's avatar Ramjee Singh Committed by Steve Kondik
Browse files

audio: Clear audio source if it is failed to be started

- fallbackToSWDecoder is not deleting mAudioSource, mOmxSource
  when there is an error while starting the source. Due to this,
  play_l calls stop() on mAudioSource even when mAudioSource is
  not started. This is leading to a crash in MPEG4Source
- Fix is to delete mAudioSource and mOmxSource if it is failed
  to be started

Change-Id: I6f555f5094b813a1e4ef3934c9e7a712ba41be02
parent b846adf2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1197,6 +1197,9 @@ status_t AwesomePlayer::fallbackToSWDecoder() {
            }
            createAudioPlayer_l();
            err = startAudioPlayer_l(false);
        } else {
            mAudioSource.clear();
            mOmxSource.clear();
        }
    }