Commit ebf39ee1 authored by Janne Grunau's avatar Janne Grunau
Browse files

unref out picture on decoding error

Fixes a picture reference leak with leak-fc8c16a84995320881aba1eb5aff19b3acf31fca.
parent 31d2a9a3
......@@ -2917,8 +2917,10 @@ int dav1d_submit_frame(Dav1dContext *const c) {
}
if (c->n_fc == 1) {
if ((res = dav1d_decode_frame(f)) < 0)
if ((res = dav1d_decode_frame(f)) < 0) {
dav1d_picture_unref(&c->out);
return res;
}
} else {
pthread_cond_signal(&f->frame_thread.td.cond);
pthread_mutex_unlock(&f->frame_thread.td.lock);
......
Supports Markdown
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