shithub: dav1d

Download patch

ref: 222bf2495f26d0445b856b469c11537a926917f2
parent: a12ba9c94d9eddc0f67dea83810e0775db346e27
author: James Almer <jamrial@gmail.com>
date: Thu Feb 14 16:03:40 EST 2019

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

They only apply to the old one.

--- a/src/obu.c
+++ b/src/obu.c
@@ -1243,6 +1243,10 @@
             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);