aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVikas Arora <vikasa@google.com>2013-09-18 14:21:10 -0700
committerVikas Arora <vikasa@google.com>2013-09-18 23:04:33 +0000
commit513e97bd307573e2adc776eb5368bd129aceaa4a (patch)
treefe814d3d44d11bd9f0abd11262d37c0816ff0851 /src
parent5807b79d0acff7f1bc35c01da54dd51541049137 (diff)
downloadwebp-kitkat-cts-dev.tar.gz
Corresponding bug for this fix is b/10823924 Happens when decoding is partial (past Partition0), without error and interrupted by calling WebPIDelete() WebPIDelete() needs to call VP8ExitCritical() to free in-flight resources. The upstream change for WebP has landed WebP git via gerrit patch: https://gerrit.chromium.org/gerrit/#/c/67199/ Change-Id: Iae0fb5d1bd239f9641503f08ffb79780da7aa42f
Diffstat (limited to 'src')
-rw-r--r--src/dec/idec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dec/idec.c b/src/dec/idec.c
index 5fbf49aa..61635ec9 100644
--- a/src/dec/idec.c
+++ b/src/dec/idec.c
@@ -606,6 +606,10 @@ void WebPIDelete(WebPIDecoder* idec) {
if (idec == NULL) return;
if (idec->dec_ != NULL) {
if (!idec->is_lossless_) {
+ if (idec->state_ == STATE_VP8_DATA) {
+ // Synchronize the thread, clean-up and check for errors.
+ VP8ExitCritical(idec->dec_, &idec->io_);
+ }
VP8Delete(idec->dec_);
} else {
VP8LDelete(idec->dec_);