CCodec: fix not to use YV12 format on COLOR_FormatYUV420Flexible for pre-S
COLOR_FormatYUV420Flexible has been mapped to
HAL_PIXEL_FORMAT_YCBCR_420_888 at pre-S devices since android R.
for backward compatibility, it should be handled by
HAL_PIXEL_FORMAT_YCBCR_420_888.
Bug: 248144271
Signed-off-by: Taehwan Kim <t_h.kim@samsung.com>
Change-Id: I8acdd105c6fe90403bc83bc567736652e838df43
diff --git a/media/codec2/sfplugin/CCodec.cpp b/media/codec2/sfplugin/CCodec.cpp
index 296d7ed..a11d789 100644
--- a/media/codec2/sfplugin/CCodec.cpp
+++ b/media/codec2/sfplugin/CCodec.cpp
@@ -1075,8 +1075,7 @@
} else {
if ((config->mDomain & Config::IS_ENCODER) || !surface) {
if (vendorSdkVersion < __ANDROID_API_S__ &&
- (format == COLOR_FormatYUV420Flexible ||
- format == COLOR_FormatYUV420Planar ||
+ (format == COLOR_FormatYUV420Planar ||
format == COLOR_FormatYUV420PackedPlanar ||
format == COLOR_FormatYUV420SemiPlanar ||
format == COLOR_FormatYUV420PackedSemiPlanar)) {