mirror of
				https://github.com/webmproject/libwebp.git
				synced 2025-10-31 02:15:42 +01:00 
			
		
		
		
	Merge "wicdec,icc: treat unsupported op as non-fatal"
This commit is contained in:
		| @@ -134,7 +134,10 @@ static HRESULT ExtractICCP(IWICImagingFactory* const factory, | |||||||
|   IWICColorContext** color_contexts; |   IWICColorContext** color_contexts; | ||||||
|  |  | ||||||
|   IFS(IWICBitmapFrameDecode_GetColorContexts(frame, 0, NULL, &count)); |   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)); |   color_contexts = (IWICColorContext**)calloc(count, sizeof(*color_contexts)); | ||||||
|   if (color_contexts == NULL) return E_OUTOFMEMORY; |   if (color_contexts == NULL) return E_OUTOFMEMORY; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user