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
diff --git a/media/codec2/components/mpeg2/C2SoftMpeg2Dec.cpp b/media/codec2/components/mpeg2/C2SoftMpeg2Dec.cpp
index 82cae7c..d62b717 100644
--- a/media/codec2/components/mpeg2/C2SoftMpeg2Dec.cpp
+++ b/media/codec2/components/mpeg2/C2SoftMpeg2Dec.cpp
@@ -611,7 +611,7 @@
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;