mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-16 05:49:51 +02:00
move WebPPictureInit to picture.c
Change-Id: I4b8c352cfd47256d0c3827334a6942c1caf742f6
This commit is contained in:
@ -21,6 +21,29 @@
|
||||
// WebPPicture
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
static int DummyWriter(const uint8_t* data, size_t data_size,
|
||||
const WebPPicture* const picture) {
|
||||
// The following are to prevent 'unused variable' error message.
|
||||
(void)data;
|
||||
(void)data_size;
|
||||
(void)picture;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int WebPPictureInitInternal(WebPPicture* picture, int version) {
|
||||
if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_ENCODER_ABI_VERSION)) {
|
||||
return 0; // caller/system version mismatch!
|
||||
}
|
||||
if (picture != NULL) {
|
||||
memset(picture, 0, sizeof(*picture));
|
||||
picture->writer = DummyWriter;
|
||||
WebPEncodingSetError(picture, VP8_ENC_OK);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
static void WebPPictureResetBufferARGB(WebPPicture* const picture) {
|
||||
picture->memory_argb_ = NULL;
|
||||
picture->argb = NULL;
|
||||
|
Reference in New Issue
Block a user