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

Commit eb767791 authored by Harish Mahendrakar's avatar Harish Mahendrakar
Browse files

C2SoftMpeg2Dec: Remove invalid check for output buffer width

If outBuffer is specificed, displayStride is the stride of the
outBuffer (line 595). Then, the "Output buffer too small" check
ends up comparing a buffer's width to the buffer's own stride
which effectively requires that a buffer's width is equal to it's stride.

Bug: 155485791
Test: cts -t android.media.cts.DecoderTest
Change-Id: Ia66591f816aac0d8aad5c1b5b9a0aeff2cc80185
parent 31e83e5b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -611,7 +611,7 @@ bool C2SoftMpeg2Dec::setDecodeArgs(ivd_video_decode_ip_t *ps_decode_ip,
    ps_decode_ip->s_out_buffer.u4_min_out_buf_size[1] = chromaSize;
    ps_decode_ip->s_out_buffer.u4_min_out_buf_size[2] = chromaSize;
    if (outBuffer) {
        if (outBuffer->width() < displayStride || outBuffer->height() < displayHeight) {
        if (outBuffer->height() < displayHeight) {
            ALOGE("Output buffer too small: provided (%dx%d) required (%ux%u)",
                  outBuffer->width(), outBuffer->height(), displayStride, displayHeight);
            return false;