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

Commit 522e4318 authored by Ray Essick's avatar Ray Essick
Browse files

avoid null dereference

fix a null pointer dereference exposed during 64-bit testing; caused a
crash at the end of recording video. I would have expected a similiar failure
in 32-bit mode, but suspect some code generation + inlining difference optimized
away the dereference in 32-bit mode. Have not identified just where that
happens.

Bug: 16890215
Test: record videos in both 32- and 64-bit modes
parent 6b0e0f02
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -643,7 +643,9 @@ void MediaCodecSource::signalEOS(status_t err) {

    if (mStopping && reachedEOS) {
        ALOGI("encoder (%s) stopped", mIsVideo ? "video" : "audio");
        if (mPuller != NULL) {
            mPuller->stopSource();
        }
        ALOGV("source (%s) stopped", mIsVideo ? "video" : "audio");
        // posting reply to everyone that's waiting
        List<sp<AReplyToken>>::iterator it;