C2SoftVpxDec: Replace CHECK() with error handling

CHECK() for color format has been replaced with appropriate error
handling.

Bug: 117625412
Bug: 152070124
Test: stagefright -s -S /sdcard/cformat.webm
Test: stagefright -s -S /sdcard/crowd_640x360p50f32_frmPar_1x1.webm
Change-Id: I1fe0be54f9910fd98ff4db9240b4dcfd09888ffb
Merged-In: I1fe0be54f9910fd98ff4db9240b4dcfd09888ffb
diff --git a/media/codec2/components/vpx/C2SoftVpxDec.cpp b/media/codec2/components/vpx/C2SoftVpxDec.cpp
index c7d73f4..3eef1e3 100644
--- a/media/codec2/components/vpx/C2SoftVpxDec.cpp
+++ b/media/codec2/components/vpx/C2SoftVpxDec.cpp
@@ -784,7 +784,13 @@
         }
 
     }
-    CHECK(img->fmt == VPX_IMG_FMT_I420 || img->fmt == VPX_IMG_FMT_I42016);
+    if(img->fmt != VPX_IMG_FMT_I420 && img->fmt != VPX_IMG_FMT_I42016) {
+        ALOGE("img->fmt %d not supported", img->fmt);
+        mSignalledError = true;
+        work->workletsProcessed = 1u;
+        work->result = C2_CORRUPTED;
+        return false;
+    }
 
     std::shared_ptr<C2GraphicBlock> block;
     uint32_t format = HAL_PIXEL_FORMAT_YV12;