mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-18 23:09:52 +02:00
Introduce CHUNK_SIZE_BYTES in muxi.h.
Plus a style fix. Change-Id: Id94df6c91a96598cb022c813e0981f542aebe982
This commit is contained in:
@ -217,9 +217,7 @@ WebPMuxError WebPMuxGetFeatures(const WebPMux* const mux, uint32_t* flags) {
|
||||
return err;
|
||||
}
|
||||
|
||||
// TODO(urvang): Add a '#define CHUNK_SIZE_BYTES 4' and use it instead of
|
||||
// hard-coded value of 4 everywhere.
|
||||
if (data.size_ < 4) return WEBP_MUX_BAD_DATA;
|
||||
if (data.size_ < CHUNK_SIZE_BYTES) return WEBP_MUX_BAD_DATA;
|
||||
|
||||
// All OK. Fill up flags.
|
||||
*flags = GetLE32(data.bytes_);
|
||||
@ -231,8 +229,9 @@ WebPMuxError WebPMuxGetImage(const WebPMux* const mux,
|
||||
WebPMuxError err;
|
||||
WebPMuxImage* wpi = NULL;
|
||||
|
||||
if (mux == NULL || (image == NULL && alpha == NULL))
|
||||
if (mux == NULL || (image == NULL && alpha == NULL)) {
|
||||
return WEBP_MUX_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
err = ValidateForImage(mux);
|
||||
if (err != WEBP_MUX_OK) return err;
|
||||
|
Reference in New Issue
Block a user