From e715285611c0975366965e9b6ddfc880d06f3bda Mon Sep 17 00:00:00 2001 From: Pascal Massimino Date: Fri, 4 Nov 2016 12:07:54 +0100 Subject: [PATCH] fix doc and code snippet for WebPINewDecoder() doc Change-Id: I1a75fdf60f0b9f1816be28f22613438bfe21752b --- src/webp/decode.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/webp/decode.h b/src/webp/decode.h index 7a3bed93..4c5e74ac 100644 --- a/src/webp/decode.h +++ b/src/webp/decode.h @@ -248,19 +248,19 @@ typedef enum VP8StatusCode { // picture is only partially decoded, pending additional input. // Code example: // -// WebPInitDecBuffer(&buffer); -// buffer.colorspace = mode; +// WebPInitDecBuffer(&output_buffer); +// output_buffer.colorspace = mode; // ... -// WebPIDecoder* idec = WebPINewDecoder(&buffer); -// while (has_more_data) { -// // ... (get additional data) +// WebPIDecoder* idec = WebPINewDecoder(&output_buffer); +// while (additional_data_is_available) { +// // ... (get additional data in some new_data[] buffer) // status = WebPIAppend(idec, new_data, new_data_size); -// if (status != VP8_STATUS_SUSPENDED || -// break; +// if (status != VP8_STATUS_OK && status != VP8_STATUS_SUSPENDED) { +// break; // an error occurred. // } // // // The above call decodes the current available buffer. -// // Part of the image can now be refreshed by calling to +// // Part of the image can now be refreshed by calling // // WebPIDecGetRGB()/WebPIDecGetYUVA() etc. // } // WebPIDelete(idec);