mirror of
https://github.com/webmproject/libwebp.git
synced 2025-02-13 15:32:53 +01:00
Demuxer creation fix:
If it's not a partial file and parser returns PARSE_NEED_MORE_DATA, then consider it to be PARSE_ERROR. Change-Id: Id652a345bd2a9f574970272dd0a00517de113215
This commit is contained in:
parent
66c810bc3c
commit
56c12aa698
@ -643,6 +643,7 @@ WebPDemuxer* WebPDemuxInternal(const WebPData* data, int allow_partial,
|
||||
if (!memcmp(parser->id, GetBuffer(&dmux->mem_), TAG_SIZE)) {
|
||||
status = parser->parse(dmux);
|
||||
if (status == PARSE_OK) dmux->state_ = WEBP_DEMUX_DONE;
|
||||
if (status == PARSE_NEED_MORE_DATA && !partial) status = PARSE_ERROR;
|
||||
if (status != PARSE_ERROR && !parser->valid(dmux)) status = PARSE_ERROR;
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user