correct WebPMemoryWriterClear ABI check
this function was introduced in 0x0204; fix checks related to this to be > 0x0203 instead of 0x0202, pointed out on ffmpeg-devel. Change-Id: I52cd2b98304baf1eb9a83094e2374f2120a1546b
This commit is contained in:
parent
8af2771813
commit
6c83157524
@ -1126,7 +1126,7 @@ int main(int argc, const char *argv[]) {
|
|||||||
return_value = 0;
|
return_value = 0;
|
||||||
|
|
||||||
Error:
|
Error:
|
||||||
#if WEBP_ENCODER_ABI_VERSION > 0x0202
|
#if WEBP_ENCODER_ABI_VERSION > 0x0203
|
||||||
WebPMemoryWriterClear(&memory_writer);
|
WebPMemoryWriterClear(&memory_writer);
|
||||||
#else
|
#else
|
||||||
free(memory_writer.mem);
|
free(memory_writer.mem);
|
||||||
|
@ -475,7 +475,7 @@ static WebPEncodingError SetFrame(const WebPConfig* const config,
|
|||||||
// TODO(later): Perhaps a rough SSIM/PSNR produced by the encoder should
|
// TODO(later): Perhaps a rough SSIM/PSNR produced by the encoder should
|
||||||
// also be a criteria, in addition to sizes.
|
// also be a criteria, in addition to sizes.
|
||||||
if (mem1.size <= mem2.size) {
|
if (mem1.size <= mem2.size) {
|
||||||
#if WEBP_ENCODER_ABI_VERSION > 0x0202
|
#if WEBP_ENCODER_ABI_VERSION > 0x0203
|
||||||
WebPMemoryWriterClear(&mem2);
|
WebPMemoryWriterClear(&mem2);
|
||||||
#else
|
#else
|
||||||
free(mem2.mem);
|
free(mem2.mem);
|
||||||
@ -483,7 +483,7 @@ static WebPEncodingError SetFrame(const WebPConfig* const config,
|
|||||||
#endif
|
#endif
|
||||||
GetEncodedData(&mem1, encoded_data);
|
GetEncodedData(&mem1, encoded_data);
|
||||||
} else {
|
} else {
|
||||||
#if WEBP_ENCODER_ABI_VERSION > 0x0202
|
#if WEBP_ENCODER_ABI_VERSION > 0x0203
|
||||||
WebPMemoryWriterClear(&mem1);
|
WebPMemoryWriterClear(&mem1);
|
||||||
#else
|
#else
|
||||||
free(mem1.mem);
|
free(mem1.mem);
|
||||||
@ -497,7 +497,7 @@ static WebPEncodingError SetFrame(const WebPConfig* const config,
|
|||||||
return error_code;
|
return error_code;
|
||||||
|
|
||||||
Err:
|
Err:
|
||||||
#if WEBP_ENCODER_ABI_VERSION > 0x0202
|
#if WEBP_ENCODER_ABI_VERSION > 0x0203
|
||||||
WebPMemoryWriterClear(&mem1);
|
WebPMemoryWriterClear(&mem1);
|
||||||
WebPMemoryWriterClear(&mem2);
|
WebPMemoryWriterClear(&mem2);
|
||||||
#else
|
#else
|
||||||
|
@ -571,7 +571,7 @@ int WebPPictureAllocYUVA(WebPPicture* const picture, int width, int height);
|
|||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
#if WEBP_ENCODER_ABI_VERSION <= 0x0202
|
#if WEBP_ENCODER_ABI_VERSION <= 0x0203
|
||||||
void WebPMemoryWriterClear(WebPMemoryWriter* writer);
|
void WebPMemoryWriterClear(WebPMemoryWriter* writer);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -231,14 +231,14 @@ struct WebPMemoryWriter {
|
|||||||
// The following must be called first before any use.
|
// The following must be called first before any use.
|
||||||
WEBP_EXTERN(void) WebPMemoryWriterInit(WebPMemoryWriter* writer);
|
WEBP_EXTERN(void) WebPMemoryWriterInit(WebPMemoryWriter* writer);
|
||||||
|
|
||||||
#if WEBP_ENCODER_ABI_VERSION > 0x0202
|
#if WEBP_ENCODER_ABI_VERSION > 0x0203
|
||||||
// The following must be called to deallocate writer->mem memory. The 'writer'
|
// The following must be called to deallocate writer->mem memory. The 'writer'
|
||||||
// object itself is not deallocated.
|
// object itself is not deallocated.
|
||||||
WEBP_EXTERN(void) WebPMemoryWriterClear(WebPMemoryWriter* writer);
|
WEBP_EXTERN(void) WebPMemoryWriterClear(WebPMemoryWriter* writer);
|
||||||
#endif
|
#endif
|
||||||
// The custom writer to be used with WebPMemoryWriter as custom_ptr. Upon
|
// The custom writer to be used with WebPMemoryWriter as custom_ptr. Upon
|
||||||
// completion, writer.mem and writer.size will hold the coded data.
|
// completion, writer.mem and writer.size will hold the coded data.
|
||||||
#if WEBP_ENCODER_ABI_VERSION > 0x0202
|
#if WEBP_ENCODER_ABI_VERSION > 0x0203
|
||||||
// writer.mem must be freed by calling WebPMemoryWriterClear.
|
// writer.mem must be freed by calling WebPMemoryWriterClear.
|
||||||
#else
|
#else
|
||||||
// writer.mem must be freed by calling 'free(writer.mem)'.
|
// writer.mem must be freed by calling 'free(writer.mem)'.
|
||||||
|
Loading…
Reference in New Issue
Block a user