Merge "WebPEncode: Support encoding same pic twice (even if modified)"

This commit is contained in:
pascal massimino 2014-11-06 22:20:01 -08:00 committed by Gerrit Code Review
commit a3e79a46f6

View File

@ -326,7 +326,7 @@ int WebPEncode(const WebPConfig* config, WebPPicture* pic) {
if (!config->lossless) { if (!config->lossless) {
VP8Encoder* enc = NULL; VP8Encoder* enc = NULL;
if (pic->y == NULL || pic->u == NULL || pic->v == NULL) { if (pic->use_argb || pic->y == NULL || pic->u == NULL || pic->v == NULL) {
// Make sure we have YUVA samples. // Make sure we have YUVA samples.
if (config->preprocessing & 4) { if (config->preprocessing & 4) {
if (!WebPPictureSmartARGBToYUVA(pic)) { if (!WebPPictureSmartARGBToYUVA(pic)) {