shithub: dav1d

Download patch

ref: ebf39ee16fc4ebef15df7a54d70627eb26592d46
parent: 31d2a9a396109e2aec9220d8e3d8aadd4b3eb8b1
author: Janne Grunau <janne-vlc@jannau.net>
date: Fri Oct 5 19:41:01 EDT 2018

unref out picture on decoding error

Fixes a picture reference leak with leak-fc8c16a84995320881aba1eb5aff19b3acf31fca.

--- a/src/decode.c
+++ b/src/decode.c
@@ -2917,8 +2917,10 @@
     }
 
     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);