diff options
Diffstat (limited to 'media/libwebp/dec/idec_dec.c')
-rw-r--r-- | media/libwebp/dec/idec_dec.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/media/libwebp/dec/idec_dec.c b/media/libwebp/dec/idec_dec.c index 6777323c7..c9506bc83 100644 --- a/media/libwebp/dec/idec_dec.c +++ b/media/libwebp/dec/idec_dec.c @@ -283,10 +283,8 @@ static void RestoreContext(const MBContext* context, VP8Decoder* const dec, static VP8StatusCode IDecError(WebPIDecoder* const idec, VP8StatusCode error) { if (idec->state_ == STATE_VP8_DATA) { - VP8Io* const io = &idec->io_; - if (io->teardown != NULL) { - io->teardown(io); - } + // Synchronize the thread, clean-up and check for errors. + VP8ExitCritical((VP8Decoder*)idec->dec_, &idec->io_); } idec->state_ = STATE_ERROR; return error; |