Add an internal WebPValidatePicture.

Change-Id: Ia01bd3975f7bd0d47eb0a1764807baed16f0d268
This commit is contained in:
Vincent Rabaud
2022-05-16 17:37:20 +02:00
parent 6c43219a5f
commit 30453ea4e6
4 changed files with 41 additions and 30 deletions

View File

@ -496,7 +496,7 @@ static int ImportYUVAFromRGBA(const uint8_t* r_ptr,
use_iterative_conversion = 0;
}
if (!WebPPictureAllocYUVA(picture, width, height)) {
if (!WebPPictureAllocYUVA(picture)) {
return 0;
}
if (has_alpha) {
@ -677,7 +677,7 @@ int WebPPictureYUVAToARGB(WebPPicture* picture) {
return WebPEncodingSetError(picture, VP8_ENC_ERROR_INVALID_CONFIGURATION);
}
// Allocate a new argb buffer (discarding the previous one).
if (!WebPPictureAllocARGB(picture, picture->width, picture->height)) return 0;
if (!WebPPictureAllocARGB(picture)) return 0;
picture->use_argb = 1;
// Convert