diff options
author | James Almer <jamrial@gmail.com> | 2019-02-15 03:03:40 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2019-02-15 03:03:40 +0300 |
commit | 222bf2495f26d0445b856b469c11537a926917f2 (patch) | |
tree | 4fc0f3bd630a8986f1965d684611cd2e2084cf1e /src/obu.c | |
parent | a12ba9c94d9eddc0f67dea83810e0775db346e27 (diff) |
obu: free Metadata buffers at the start of a new Sequence
They only apply to the old one.
Diffstat (limited to 'src/obu.c')
-rw-r--r-- | src/obu.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |