mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-14 21:09:55 +02:00
add ABI compatibility check
minor revision shouldn't matter, we only check major revision number. Bumped all version numbers so that incompatibility starts *now* Change-Id: Id06c20f03039845ae4cfb3fd121807b931d67ee4
This commit is contained in:
@ -651,7 +651,7 @@ int WebPGetInfo(const uint8_t* data, size_t data_size,
|
||||
|
||||
int WebPInitDecoderConfigInternal(WebPDecoderConfig* config,
|
||||
int version) {
|
||||
if (version != WEBP_DECODER_ABI_VERSION) {
|
||||
if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_DECODER_ABI_VERSION)) {
|
||||
return 0; // version mismatch
|
||||
}
|
||||
if (config == NULL) {
|
||||
@ -667,7 +667,7 @@ VP8StatusCode WebPGetFeaturesInternal(const uint8_t* data, size_t data_size,
|
||||
WebPBitstreamFeatures* features,
|
||||
int version) {
|
||||
VP8StatusCode status;
|
||||
if (version != WEBP_DECODER_ABI_VERSION) {
|
||||
if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_DECODER_ABI_VERSION)) {
|
||||
return VP8_STATUS_INVALID_PARAM; // version mismatch
|
||||
}
|
||||
if (features == NULL) {
|
||||
|
Reference in New Issue
Block a user