Merge "WebPEncode: clear stats at the start of encode" into 0.2.0

This commit is contained in:
pascal massimino
2012-08-01 12:00:09 -07:00
committed by Gerrit Code Review
3 changed files with 7 additions and 5 deletions

View File

@ -344,6 +344,8 @@ int WebPEncode(const WebPConfig* config, WebPPicture* pic) {
if (pic->width > WEBP_MAX_DIMENSION || pic->height > WEBP_MAX_DIMENSION)
return WebPEncodingSetError(pic, VP8_ENC_ERROR_BAD_DIMENSION);
if (pic->stats != NULL) memset(pic->stats, 0, sizeof(*pic->stats));
if (!config->lossless) {
VP8Encoder* enc = NULL;
if (pic->y == NULL || pic->u == NULL || pic->v == NULL) {