ref: fd5a950a7d1cedf0b30f5e9f34922bd6fae2f02a
parent: c2e0490c0f5c2b326787a9b7200c8ac543cbf323
author: James Almer <jamrial@gmail.com>
date: Wed Feb 13 20:00:20 EST 2019
lib: explicity free the metadata buffers in dav1d_close() They were meant to be freed by the call to dav1d_flush() at the beginning, but before the previous commit that wasn't the case when decoding with one frame thread. This ensures they are explicity freed here and not depend on other functions behaving correctly.
--- a/src/lib.c
+++ b/src/lib.c
@@ -535,6 +535,9 @@
dav1d_ref_dec(&c->seq_hdr_ref);
dav1d_ref_dec(&c->frame_hdr_ref);
+ dav1d_ref_dec(&c->mastering_display_ref);
+ dav1d_ref_dec(&c->content_light_ref);
+
dav1d_freep_aligned(c_out);
}