From ff885bfe1f6e419bec762b28879f7039318eaf4e Mon Sep 17 00:00:00 2001 From: Pascal Massimino Date: Tue, 9 Apr 2013 17:52:37 -0700 Subject: [PATCH] add precision about dynamic output reallocation with IDecoder The output surface CAN be changed inbetween calls to WebPIUpdate() or WebPIAppend(), but with precautions. Change-Id: I899afbd95738a6a8e0e7000f8daef3e74c99ddd8 --- src/webp/decode.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/webp/decode.h b/src/webp/decode.h index 181eb186..f8a852ca 100644 --- a/src/webp/decode.h +++ b/src/webp/decode.h @@ -262,6 +262,12 @@ enum VP8StatusCode { // is used (with MODE_RGB). Otherwise, an internal reference to 'output_buffer' // is kept, which means that the lifespan of 'output_buffer' must be larger than // that of the returned WebPIDecoder object. +// The supplied 'output_buffer' content MUST NOT be changed between calls to +// WebPIAppend() or WebPIUpdate() unless 'output_buffer.is_external_memory' is +// set to 1. In such a case, it is allowed to modify the pointers, size and +// stride of output_buffer.u.RGBA or output_buffer.u.YUVA, provided they remain +// within valid bounds. +// All other fields of WebPDecBuffer MUST remain constant between calls. // Returns NULL if the allocation failed. WEBP_EXTERN(WebPIDecoder*) WebPINewDecoder(WebPDecBuffer* output_buffer);