diff --git a/src/dec/idec.c b/src/dec/idec.c index 7ca3df4f..6d131136 100644 --- a/src/dec/idec.c +++ b/src/dec/idec.c @@ -281,7 +281,7 @@ static VP8StatusCode DecodeVP8FrameHeader(WebPIDecoder* const idec) { // Not enough data bytes to extract VP8 Frame Header. return VP8_STATUS_SUSPENDED; } - if (!VP8GetInfo(data, curr_size, idec->vp8_size_, NULL, NULL, NULL)) { + if (!VP8GetInfo(data, curr_size, idec->vp8_size_, NULL, NULL)) { return IDecError(idec, VP8_STATUS_BITSTREAM_ERROR); } diff --git a/src/dec/vp8.c b/src/dec/vp8.c index 3c1457e0..dac58035 100644 --- a/src/dec/vp8.c +++ b/src/dec/vp8.c @@ -80,14 +80,7 @@ int VP8SetError(VP8Decoder* const dec, //------------------------------------------------------------------------------ int VP8GetInfo(const uint8_t* data, uint32_t data_size, uint32_t chunk_size, - int* width, int* height, int* has_alpha) { - // Alpha-data is stored outside VP8 data and is inferred from VP8X chunk. - // So, this function always returns *has_alpha = 0. This value should NOT - // be used. - if (has_alpha != NULL) { - *has_alpha = 0; - } - + int* width, int* height) { if (data_size < 10) { return 0; // not enough data } diff --git a/src/dec/vp8i.h b/src/dec/vp8i.h index e2edd2c7..131cfe5a 100644 --- a/src/dec/vp8i.h +++ b/src/dec/vp8i.h @@ -289,12 +289,12 @@ int VP8SetError(VP8Decoder* const dec, VP8StatusCode error, const char * const msg); // Validates the VP8 data-header and retrieve basic header information viz width -// and height. Returns 0 in case of formatting error. *width/*height/*has_alpha +// and height. Returns 0 in case of formatting error. *width/*height // can be passed NULL. int VP8GetInfo(const uint8_t* data, uint32_t data_size, // data available so far uint32_t chunk_size, // total data size expect in the chunk - int *width, int *height, int *has_alpha); + int *width, int *height); // in tree.c void VP8ResetProba(VP8Proba* const proba); diff --git a/src/dec/webp.c b/src/dec/webp.c index 91c479f0..217ef9ee 100644 --- a/src/dec/webp.c +++ b/src/dec/webp.c @@ -523,7 +523,7 @@ static VP8StatusCode GetFeatures(const uint8_t* data, uint32_t data_size, // Validates raw VP8 data. if (!VP8GetInfo(data, data_size, vp8_chunk_size, - &features->width, &features->height, NULL)) { + &features->width, &features->height)) { return VP8_STATUS_BITSTREAM_ERROR; } diff --git a/src/mux/mux.c b/src/mux/mux.c index 125e3ffd..cfa4e20f 100644 --- a/src/mux/mux.c +++ b/src/mux/mux.c @@ -166,7 +166,7 @@ static WebPImageInfo* CreateImageInfo(uint32_t x_offset, uint32_t y_offset, int height; WebPImageInfo* image_info = NULL; - if (!VP8GetInfo(data, size, size, &width, &height, NULL)) { + if (!VP8GetInfo(data, size, size, &width, &height)) { return NULL; } @@ -1298,7 +1298,7 @@ static WebPMuxError GetImageCanvasHeightWidth(const WebPMux* const mux, const WebPChunk* const image_chunk = wpi->vp8_; assert(image_chunk != NULL); if (VP8GetInfo(image_chunk->data_, image_chunk->payload_size_, - image_chunk->payload_size_, &w, &h, NULL)) { + image_chunk->payload_size_, &w, &h)) { *width = w; *height = h; }