Fix VP8IoTeardownHook being called twice on worker sync failure

idec_dec.c, DecodeRemaining: Set decoder state to ERROR to prevent VP8ExitCritical to be called again

BUG=webp:512

Change-Id: Id5f893f45c348e1c529680d930e640f780a73d4c
(cherry picked from commit 9e729fe19bb60f4ecac357a3d3f5c5c64dd080d2)
(cherry picked from commit a14e0f646550f90c22395f613b9dda1c90401266)
This commit is contained in:
Yannis Guyon 2018-07-02 13:15:38 +02:00 committed by James Zern
parent 641fbb5e89
commit 35de4be698

View File

@ -489,6 +489,7 @@ static VP8StatusCode DecodeRemaining(WebPIDecoder* const idec) {
}
// Synchronize the thread and check for errors.
if (!VP8ExitCritical(dec, io)) {
idec->state_ = STATE_ERROR; // prevent re-entry in IDecError
return IDecError(idec, VP8_STATUS_USER_ABORT);
}
dec->ready_ = 0;