summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann <johannkoenig@google.com>2015-01-13 15:50:08 -0800
committerJohann <johannkoenig@google.com>2015-01-13 15:50:08 -0800
commit715db78484f91a05fbd0584c0ed6e9d2ffc9be06 (patch)
treeddb1a91fc7aca2f68abf06c70bf8adc92dbed69d
parent2e5ced5fd62a73f4f5687ab19520b3aad1c53f6f (diff)
downloadlibvpx-715db78484f91a05fbd0584c0ed6e9d2ffc9be06.tar.gz
vp9: sync threads after a longjmp
Synchronize all threads immediately as a subsequent decode call may cause a resize invalidating some allocations. fixes one aspect of crbug.com/437655 https://gerrit.chromium.org/gerrit/73143 BUG=437655 R=tomfinegan@chromium.org Review URL: https://codereview.chromium.org//848963004
-rw-r--r--source/libvpx/vp9/decoder/vp9_decoder.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/libvpx/vp9/decoder/vp9_decoder.c b/source/libvpx/vp9/decoder/vp9_decoder.c
index baf6ab7..78eb36f 100644
--- a/source/libvpx/vp9/decoder/vp9_decoder.c
+++ b/source/libvpx/vp9/decoder/vp9_decoder.c
@@ -241,8 +241,19 @@ int vp9_receive_compressed_data(VP9Decoder *pbi,
cm->new_fb_idx = get_free_fb(cm);
if (setjmp(cm->error.jmp)) {
+ const VP9WorkerInterface *const winterface = vp9_get_worker_interface();
+ int i;
+
pbi->need_resync = 1;
cm->error.setjmp = 0;
+
+ // Synchronize all threads immediately as a subsequent decode call may
+ // cause a resize invalidating some allocations.
+ winterface->sync(&pbi->lf_worker);
+ for (i = 0; i < pbi->num_tile_workers; ++i) {
+ winterface->sync(&pbi->tile_workers[i]);
+ }
+
vp9_clear_system_state();
// We do not know if the missing frame(s) was supposed to update