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

Commit 072be1ea authored by Chih-Chung Chang's avatar Chih-Chung Chang
Browse files

Fix 5200962: Handle 0-length buffers from OMXCodec and drop it.

Change-Id: I67c42c41f649f8e37055721efb67ab3ca4b02f0b
parent aef59c54
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1384,6 +1384,13 @@ M4OSA_ERR VideoEditorVideoDecoder_decode(M4OSA_Context context,
            continue;
        }

        // The OMXCodec client should expect to receive 0-length buffers
        // and drop the 0-length buffers.
        if (pNextBuffer->range_length() == 0) {
            pNextBuffer->release();
            continue;
        }

        // Now we have a good next buffer, release the previous one.
        if (pDecoderBuffer != NULL) {
            pDecoderBuffer->release();