Commit 222bf249 authored by James Almer's avatar James Almer

obu: free Metadata buffers at the start of a new Sequence

They only apply to the old one.
parent a12ba9c9
......@@ -1243,6 +1243,10 @@ int dav1d_parse_obus(Dav1dContext *const c, Dav1dData *const in, int global) {
c->frame_hdr = NULL;
else if (memcmp(seq_hdr, c->seq_hdr, sizeof(*seq_hdr))) {
c->frame_hdr = NULL;
c->mastering_display = NULL;
c->content_light = NULL;
dav1d_ref_dec(&c->mastering_display_ref);
dav1d_ref_dec(&c->content_light_ref);
for (int i = 0; i < 8; i++) {
if (c->refs[i].p.p.data[0])
dav1d_thread_picture_unref(&c->refs[i].p);
......
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