fix WebPIDecGetRGB() to accept any RGB(A) mode, not just MODE_RGB

Change-Id: I8780582ecd0868c84e2b1310addebd6c8989e727
This commit is contained in:
Pascal Massimino
2011-04-20 08:42:08 -07:00
parent 8aa50efd38
commit ca554137d2
2 changed files with 8 additions and 7 deletions

View File

@ -538,9 +538,9 @@ VP8StatusCode WebPIUpdate(WebPIDecoder* const idec, const uint8_t* data,
//------------------------------------------------------------------------------
uint8_t* WebPIDecGetRGB(const WebPIDecoder* const idec, int *last_y,
int* width, int* height, int* stride) {
if (!idec || !idec->dec_ || idec->params_.mode != MODE_RGB ||
uint8_t* WebPIDecGetRGB(const WebPIDecoder* const idec, int *last_y, int* width,
int* height, int* stride) {
if (!idec || !idec->dec_ || idec->params_.mode == MODE_YUV ||
idec->state_ <= STATE_PARTS0) {
return NULL;
}