mirror of
https://github.com/webmproject/libwebp.git
synced 2025-04-05 00:16:50 +02:00
WebPMemoryWriterClear: use WebPMemoryWriterInit
Removes some common code between the two functions. Change-Id: If9f42e580e34dad63f3806750d9d7571941026b5
This commit is contained in:
parent
a4183d94c7
commit
e0ae21d231
@ -226,9 +226,7 @@ int WebPMemoryWrite(const uint8_t* data, size_t data_size,
|
|||||||
void WebPMemoryWriterClear(WebPMemoryWriter* writer) {
|
void WebPMemoryWriterClear(WebPMemoryWriter* writer) {
|
||||||
if (writer != NULL) {
|
if (writer != NULL) {
|
||||||
WebPSafeFree(writer->mem);
|
WebPSafeFree(writer->mem);
|
||||||
writer->mem = NULL;
|
WebPMemoryWriterInit(writer);
|
||||||
writer->size = 0;
|
|
||||||
writer->max_size = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user