Guard the lossless encoder (in flux) under a flag

Change-Id: I6dd8fd17089c199001c06b1afde14233dc3e3234
This commit is contained in:
Urvang Joshi
2012-04-11 09:52:13 +00:00
committed by James Zern
parent 09f7532cce
commit 6b38378acb
16 changed files with 82 additions and 4 deletions

View File

@ -364,10 +364,14 @@ int WebPEncode(const WebPConfig* const config, WebPPicture* const pic) {
}
DeleteVP8Encoder(enc);
} else {
#ifdef USE_LOSSLESS_ENCODER
if (pic->argb == NULL)
return WebPEncodingSetError(pic, VP8_ENC_ERROR_NULL_PARAMETER);
ok = VP8LEncodeImage(config, pic); // Sets pic->error in case of problem.
#else
return WebPEncodingSetError(pic, VP8_ENC_ERROR_INVALID_CONFIGURATION);
#endif
}
return ok;