mux: ensure # images = # tiles

when a file contains tiles an image outside of a tile is not allowed.

Change-Id: I5d16759abc9aa9bb299103b2cd7d694fc9c89697
This commit is contained in:
James Zern 2012-04-13 19:07:41 -07:00
parent 231ec1fb6d
commit 326a3c6bdc

View File

@ -540,6 +540,11 @@ WebPMuxError WebPMuxValidate(const WebPMux* const mux) {
return WEBP_MUX_INVALID_ARGUMENT;
}
// num_tiles & num_images are consistent.
if (num_tiles > 0 && num_images != num_tiles) {
return WEBP_MUX_INVALID_ARGUMENT;
}
return WEBP_MUX_OK;
}