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

Commit cd160b17 authored by James Dong's avatar James Dong Committed by Android Git Automerger
Browse files

am 022048e9: Stop audio source if AudioPlayer could not be started

* commit '022048e9':
  Stop audio source if AudioPlayer could not be started
parents 87cbe8ae 022048e9
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -142,9 +142,10 @@ status_t AudioPlayer::start(bool sourceAlreadyStarted) {
                mFirstBuffer = NULL;
            }

            if (!sourceAlreadyStarted) {
            // At this point, source already got started
            // Stop the source when error is found.
            mSource->stop();
            }
            mSource = NULL;

            return err;
        }
@@ -174,9 +175,9 @@ status_t AudioPlayer::start(bool sourceAlreadyStarted) {
                mFirstBuffer = NULL;
            }

            if (!sourceAlreadyStarted) {
            // At this point, source already got started
            // Stop the source when error is found.
            mSource->stop();
            }

            return err;
        }