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
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2018-09-26 00:50:01 +0300
committerJames Almer <jamrial@gmail.com>2018-09-26 00:50:01 +0300
commit0cf63fb76a9c7ebf72de2878a628a12673ee232c (patch)
tree224f14cba150670bae32453a342c32d0e27b99b8 /include
parent9fd4ede0ec96178bf6ca2d5b7c9ae15e0b7eee54 (diff)
make dav1d_close() write NULL to the Dav1dContext pointer after freeing it
This prevents leaving the caller with a dangling pointer.
Diffstat (limited to 'include')
-rw-r--r--include/dav1d/dav1d.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/dav1d/dav1d.h b/include/dav1d/dav1d.h
index 9ce476d..d9965eb 100644
--- a/include/dav1d/dav1d.h
+++ b/include/dav1d/dav1d.h
@@ -80,8 +80,8 @@ DAV1D_API int dav1d_open(Dav1dContext **c_out, const Dav1dSettings *s);
DAV1D_API int dav1d_decode(Dav1dContext *c, Dav1dData *in, Dav1dPicture *out);
/**
- * Close decoder instance, free all associated memory.
+ * Close decoder instance, free all associated memory, and set $c_out to NULL.
*/
-DAV1D_API void dav1d_close(Dav1dContext *c);
+DAV1D_API void dav1d_close(Dav1dContext **c_out);
#endif /* __DAV1D_H__ */