9cd9f3
diff -up libwebp-0.3.0/src/dec/idec.c.rhbz-1956843 libwebp-0.3.0/src/dec/idec.c
9cd9f3
--- libwebp-0.3.0/src/dec/idec.c.rhbz-1956843	2021-05-17 10:44:13.670402403 +0200
9cd9f3
+++ libwebp-0.3.0/src/dec/idec.c	2021-05-17 10:45:31.035742375 +0200
9cd9f3
@@ -241,10 +241,8 @@ static void RestoreContext(const MBConte
9cd9f3
 
9cd9f3
 static VP8StatusCode IDecError(WebPIDecoder* const idec, VP8StatusCode error) {
9cd9f3
   if (idec->state_ == STATE_VP8_DATA) {
9cd9f3
-    VP8Io* const io = &idec->io_;
9cd9f3
-    if (io->teardown) {
9cd9f3
-      io->teardown(io);
9cd9f3
-    }
9cd9f3
+    // Synchronize the thread, clean-up and check for errors.
9cd9f3
+    VP8ExitCritical((VP8Decoder*)idec->dec_, &idec->io_);
9cd9f3
   }
9cd9f3
   idec->state_ = STATE_ERROR;
9cd9f3
   return error;