codec2: Fix width and height when output is cropped

Return cropped width and height instead of block's width
and height

Test: cts-tradefed run cts -m CtsMediaBitstreamsTestCases \
 -t android.media.cts.bitstreams.H264Yuv420_8bitBpBitstreamsTest
Bug: 132042537

Change-Id: I72538248fff4aeb9f0ad51e6e0d8844f66f20f92
diff --git a/media/codec2/sfplugin/Codec2Buffer.cpp b/media/codec2/sfplugin/Codec2Buffer.cpp
index c6cbad3..d2b31ee 100644
--- a/media/codec2/sfplugin/Codec2Buffer.cpp
+++ b/media/codec2/sfplugin/Codec2Buffer.cpp
@@ -391,8 +391,8 @@
                 return;
         }
         mediaImage->mNumPlanes = layout.numPlanes;
-        mediaImage->mWidth = mWidth;
-        mediaImage->mHeight = mHeight;
+        mediaImage->mWidth = view.crop().width;
+        mediaImage->mHeight = view.crop().height;
         mediaImage->mBitDepth = bitDepth;
         mediaImage->mBitDepthAllocated = mAllocatedDepth;