From 6f104034a191b7a95ff8838f014f6d78103781c7 Mon Sep 17 00:00:00 2001 From: skal Date: Mon, 2 Dec 2013 15:23:12 +0100 Subject: [PATCH] fix bug due to overzealous check in WebPPictureYUVAToARGB() This tests prevented views to be converted to ARGB https://code.google.com/p/webp/issues/detail?id=178 Change-Id: I5ba66da2791e6f1d2bfd8c55b5fffe6955263374 --- src/enc/picture.c | 3 +-- src/webp/encode.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/enc/picture.c b/src/enc/picture.c index 0ba787f7..c01c59b1 100644 --- a/src/enc/picture.c +++ b/src/enc/picture.c @@ -888,8 +888,7 @@ int WebPPictureImportBGRX(WebPPicture* picture, int WebPPictureYUVAToARGB(WebPPicture* picture) { if (picture == NULL) return 0; - if (picture->memory_ == NULL || picture->y == NULL || - picture->u == NULL || picture->v == NULL) { + if (picture->y == NULL || picture->u == NULL || picture->v == NULL) { return WebPEncodingSetError(picture, VP8_ENC_ERROR_NULL_PARAMETER); } if ((picture->colorspace & WEBP_CSP_ALPHA_BIT) && picture->a == NULL) { diff --git a/src/webp/encode.h b/src/webp/encode.h index f9fa05cb..0b8fe4c9 100644 --- a/src/webp/encode.h +++ b/src/webp/encode.h @@ -20,7 +20,7 @@ extern "C" { #endif -#define WEBP_ENCODER_ABI_VERSION 0x0201 // MAJOR(8b) + MINOR(8b) +#define WEBP_ENCODER_ABI_VERSION 0x0202 // MAJOR(8b) + MINOR(8b) // Note: forward declaring enumerations is not allowed in (strict) C and C++, // the types are left here for reference.