Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/obu.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2019-02-15 03:03:40 +0300
committerJames Almer <jamrial@gmail.com>2019-02-15 03:03:40 +0300
commit222bf2495f26d0445b856b469c11537a926917f2 (patch)
tree4fc0f3bd630a8986f1965d684611cd2e2084cf1e /src/obu.c
parenta12ba9c94d9eddc0f67dea83810e0775db346e27 (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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/obu.c b/src/obu.c
index 4bc36af..f88fbca 100644
--- a/src/obu.c
+++ b/src/obu.c
@@ -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);