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/CCodec.cpp b/media/codec2/sfplugin/CCodec.cpp
index f5a4d94..1b6266f 100644
--- a/media/codec2/sfplugin/CCodec.cpp
+++ b/media/codec2/sfplugin/CCodec.cpp
@@ -1739,7 +1739,7 @@
// block.width(), block.height());
updates.emplace_back(new C2StreamCropRectInfo::output(stream, block.crop()));
updates.emplace_back(new C2StreamPictureSizeInfo::output(
- stream, block.width(), block.height()));
+ stream, block.crop().width, block.crop().height));
break; // for now only do the first block
}
++stream;