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

Commit 08063406 authored by Lajos Molnar's avatar Lajos Molnar
Browse files

stagefright: prevent more crashes in ACodec

Signal errors if OMX or native window reports an error

Bug: 20439174
Change-Id: Iebeb16f5a29c6819d39568a184b921799a234686
parent 777cf6d2
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -147,8 +147,13 @@ private:
            OWNED_BY_UPSTREAM,
            OWNED_BY_DOWNSTREAM,
            OWNED_BY_NATIVE_WINDOW,
            UNRECOGNIZED,            // not a tracked buffer
        };

        static inline Status getSafeStatus(BufferInfo *info) {
            return info == NULL ? UNRECOGNIZED : info->mStatus;
        }

        IOMX::buffer_id mBufferID;
        Status mStatus;
        unsigned mDequeuedAt;
@@ -157,6 +162,9 @@ private:
        sp<GraphicBuffer> mGraphicBuffer;
    };

    static const char *_asString(BufferInfo::Status s);
    void dumpBuffers(OMX_U32 portIndex);

#if TRACK_BUFFER_TIMING
    struct BufferStats {
        int64_t mEmptyBufferTimeUs;
+299 −164

File changed.

Preview size limit exceeded, changes collapsed.