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

Commit c4270cc3 authored by Dichen Zhang's avatar Dichen Zhang
Browse files

fix bug: release mDisconnectLock when early terminate

Bug: 134995545
Tests: (1) described in buganizer comment #2
       (2) atest CtsCameraTestCases:android.hardware.camera2.cts.FastBasicsTest#testCamera1
Change-Id: Ie134e503cd7602a754b57bcc5c1355dea19d4eab
parent e81a326d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -389,7 +389,6 @@ void NuPlayer::GenericSource::onPrepareAsync() {
                if (httpSource == NULL) {
                    ALOGE("Failed to create http source!");
                    notifyPreparedAndCleanup(UNKNOWN_ERROR);
                    mDisconnectLock.lock();
                    return;
                }
                mDisconnectLock.lock();
@@ -449,6 +448,7 @@ void NuPlayer::GenericSource::onPrepareAsync() {

        if (mDataSource == NULL) {
            ALOGE("Failed to create data source!");
            mDisconnectLock.unlock();
            notifyPreparedAndCleanup(UNKNOWN_ERROR);
            return;
        }