fix doc and code snippet for WebPINewDecoder() doc

Change-Id: I1a75fdf60f0b9f1816be28f22613438bfe21752b
This commit is contained in:
Pascal Massimino 2016-11-04 12:07:54 +01:00
parent de9fa5074e
commit e715285611

View File

@ -248,19 +248,19 @@ typedef enum VP8StatusCode {
// picture is only partially decoded, pending additional input. // picture is only partially decoded, pending additional input.
// Code example: // Code example:
// //
// WebPInitDecBuffer(&buffer); // WebPInitDecBuffer(&output_buffer);
// buffer.colorspace = mode; // output_buffer.colorspace = mode;
// ... // ...
// WebPIDecoder* idec = WebPINewDecoder(&buffer); // WebPIDecoder* idec = WebPINewDecoder(&output_buffer);
// while (has_more_data) { // while (additional_data_is_available) {
// // ... (get additional data) // // ... (get additional data in some new_data[] buffer)
// status = WebPIAppend(idec, new_data, new_data_size); // status = WebPIAppend(idec, new_data, new_data_size);
// if (status != VP8_STATUS_SUSPENDED || // if (status != VP8_STATUS_OK && status != VP8_STATUS_SUSPENDED) {
// break; // break; // an error occurred.
// } // }
// //
// // The above call decodes the current available buffer. // // 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. // // WebPIDecGetRGB()/WebPIDecGetYUVA() etc.
// } // }
// WebPIDelete(idec); // WebPIDelete(idec);