Mux: only allow adding frame/tiles at the end.

Change-Id: I5d685628da8c8ac85144cee2e5808b30ec79fef9
This commit is contained in:
Urvang Joshi
2012-06-22 11:17:02 -07:00
parent 2c341b0eed
commit b494ad5096
6 changed files with 32 additions and 59 deletions

View File

@ -151,7 +151,7 @@ WebPMux* WebPMuxCreateInternal(const WebPData* const bitstream, int copy_data,
if (id == WEBP_CHUNK_IMAGE) {
wpi->is_partial_ = 0; // wpi is completely filled.
// Add this to mux->images_ list.
if (MuxImageSetNth(wpi, &mux->images_, 0) != WEBP_MUX_OK) goto Err;
if (MuxImagePush(wpi, &mux->images_) != WEBP_MUX_OK) goto Err;
MuxImageInit(wpi); // Reset for reading next image.
} else {
wpi->is_partial_ = 1; // wpi is only partially filled.