ref: b7c64ad69171d0d8890ab3bf385f295faa24cda5
parent: 9ce4b734cedbbce0a0f3875ce36a20de5ef3a5f1
author: Janne Grunau <janne-vlc@jannau.net>
date: Mon Nov 26 05:49:45 EST 2018
fix memleaks with ref counted sequence and frame headers
--- a/src/lib.c
+++ b/src/lib.c
@@ -457,5 +457,8 @@
dav1d_ref_dec(&c->refs[n].refmvs);
dav1d_ref_dec(&c->refs[n].segmap);
}
+ dav1d_ref_dec(&c->seq_hdr_ref);
+ dav1d_ref_dec(&c->frame_hdr_ref);
+
dav1d_freep_aligned(c_out);
}
--- a/src/obu.c
+++ b/src/obu.c
@@ -1248,8 +1248,8 @@
if (c->cdf[i].cdf)
dav1d_cdf_thread_unref(&c->cdf[i]);
}
- dav1d_ref_dec(&c->seq_hdr_ref);
}
+ dav1d_ref_dec(&c->seq_hdr_ref);
c->seq_hdr_ref = ref;
c->seq_hdr = seq_hdr;
break;