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

Commit 3727e3d8 authored by Gloria Wang's avatar Gloria Wang Committed by Android (Google) Code Review
Browse files

Merge "Stop the AudioSource in reset() of AwesomePlayer if AudioSource is not...

Merge "Stop the AudioSource in reset() of AwesomePlayer if AudioSource is not NULL and AudioPlayer was not started. Fix for 5236419."
parents e7197a99 e28857c1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -513,7 +513,8 @@ void AwesomePlayer::reset_l() {
    // If we did this later, audio would continue playing while we
    // shutdown the video-related resources and the player appear to
    // not be as responsive to a reset request.
    if (mAudioPlayer == NULL && mAudioSource != NULL) {
    if ((mAudioPlayer == NULL || !(mFlags & AUDIOPLAYER_STARTED))
            && mAudioSource != NULL) {
        // If we had an audio player, it would have effectively
        // taken possession of the audio source and stopped it when
        // _it_ is stopped. Otherwise this is still our responsibility.