Commit b210e657 authored by Ronald S. Bultje's avatar Ronald S. Bultje

Clear coefficient cache upon error

Fixes subsequent decoding errors after unrelated decoding errors or
flush/seek events.
parent 3fe0d740
......@@ -41,7 +41,10 @@ void *dav1d_frame_task(void *const data) {
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment