Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Unified Diff: source/libvpx/vp9/decoder/vp9_decoder.c

Issue 848963004: vp9: sync threads after a longjmp (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@m40-2214
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp9/decoder/vp9_decoder.c
diff --git a/source/libvpx/vp9/decoder/vp9_decoder.c b/source/libvpx/vp9/decoder/vp9_decoder.c
index baf6ab7ef5243566ef425cacf1cad535bba4fa25..78eb36f360dda82b1d8596b7aa39f362c1dba06c 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698