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

Commit 39609a0a authored by Andy Hung's avatar Andy Hung Committed by Glenn Kasten
Browse files

AudioTrack: Skip callback EVENT_STREAM_END on DEAD_OBJECT.

Send only EVENT_NEW_IAUDIOTRACK to initiate teardown.

Bug: 23750452
Change-Id: Ib5dcd578b5b6a6a1d91a03e58ef8da0acd994243
parent e5200ea7
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1852,7 +1852,11 @@ nsecs_t AudioTrack::processAudioBuffer()
        case NO_ERROR:
        case DEAD_OBJECT:
        case TIMED_OUT:
            if (status != DEAD_OBJECT) {
                // for DEAD_OBJECT, we do not send a EVENT_STREAM_END after stop();
                // instead, the application should handle the EVENT_NEW_IAUDIOTRACK.
                mCbf(EVENT_STREAM_END, mUserData, NULL);
            }
            {
                AutoMutex lock(mLock);
                // The previously assigned value of waitStreamEnd is no longer valid,