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

Commit b6ac8e2c authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Don't render buffers that have size 0

b/8857451

Change-Id: I12a31a2f85af76602db9e6f0ec80632954b3f7ed
parent 9d75e992
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3131,7 +3131,8 @@ void ACodec::BaseState::onOutputBufferDrained(const sp<AMessage> &msg) {

    int32_t render;
    if (mCodec->mNativeWindow != NULL
            && msg->findInt32("render", &render) && render != 0) {
            && msg->findInt32("render", &render) && render != 0
            && (info->mData == NULL || info->mData->size() != 0)) {
        // The client wants this buffer to be rendered.

        status_t err;
+1 −1
Original line number Diff line number Diff line
@@ -1656,7 +1656,7 @@ status_t MediaCodec::onReleaseOutputBuffer(const sp<AMessage> &msg) {
        return -EACCES;
    }

    if (render) {
    if (render && (info->mData == NULL || info->mData->size() != 0)) {
        info->mNotify->setInt32("render", true);

        if (mSoftRenderer != NULL) {