Merge "wicdec,icc: treat unsupported op as non-fatal"
diff --git a/imageio/wicdec.c b/imageio/wicdec.c
index a669413..880c99a 100644
--- a/imageio/wicdec.c
+++ b/imageio/wicdec.c
@@ -134,7 +134,10 @@
   IWICColorContext** color_contexts;
 
   IFS(IWICBitmapFrameDecode_GetColorContexts(frame, 0, NULL, &count));
-  if (FAILED(hr) || count == 0) return hr;
+  if (FAILED(hr) || count == 0) {
+    // Treat unsupported operation as a non-fatal error. See crbug.com/webp/506.
+    return (hr == WINCODEC_ERR_UNSUPPORTEDOPERATION) ? S_OK : hr;
+  }
 
   color_contexts = (IWICColorContext**)calloc(count, sizeof(*color_contexts));
   if (color_contexts == NULL) return E_OUTOFMEMORY;