ref: b210e65799dc2f7fb4310488446d26b6d20fd431
parent: 3fe0d740ba96760bc413cea98d40719fb411a67a
author: Ronald S. Bultje <[email protected]>
date: Wed Nov 28 06:26:26 EST 2018
Clear coefficient cache upon error Fixes subsequent decoding errors after unrelated decoding errors or flush/seek events.
--- a/src/thread_task.c
+++ b/src/thread_task.c
@@ -41,7 +41,10 @@
if (f->frame_thread.die) break;
pthread_mutex_unlock(&f->frame_thread.td.lock);
- dav1d_decode_frame(f);
+ const int res = dav1d_decode_frame(f);
+ if (res)
+ memset(f->frame_thread.cf, 0,
+ sizeof(int32_t) * 3 * f->lf.mask_sz * 128 * 128);
pthread_mutex_lock(&f->frame_thread.td.lock);
f->n_tile_data = 0;