summaryrefslogtreecommitdiffstats
path: root/libass/ass.h
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@chown.ath.cx>2015-06-12 01:35:40 +0200
committerGrigori Goronzy <greg@chown.ath.cx>2015-07-10 10:42:41 +0200
commitb39e873342825f9640580b8237cf19ecf247e261 (patch)
tree5cd6abf37bfa8efe9261bb37fd9a5684e5baf196 /libass/ass.h
parent9f34be2732f4c1460a36de86e8cdeac92e821042 (diff)
downloadlibass-b39e873342825f9640580b8237cf19ecf247e261.tar.bz2
libass-b39e873342825f9640580b8237cf19ecf247e261.tar.xz
fontselect: malloc and error checking
Add malloc checks with useful semantics and error checks in some specific cases. This should hopefully make fontselect more robust. The platform-specific font providers (DirectWrite/CoreText/FontConfig) still need to be checked for proper memory management.
Diffstat (limited to 'libass/ass.h')
-rw-r--r--libass/ass.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/libass/ass.h b/libass/ass.h
index 5fd11a6..576e168 100644
--- a/libass/ass.h
+++ b/libass/ass.h
@@ -402,7 +402,12 @@ void ass_set_line_spacing(ASS_Renderer *priv, double line_spacing);
void ass_set_line_position(ASS_Renderer *priv, double line_position);
/**
- * \brief Get the list of available font providers.
+ * \brief Get the list of available font providers. The output array
+ * is allocated with malloc and can be released with free(). If an
+ * allocation error occurs, size is set to (size_t)-1.
+ * \param priv library handle
+ * \param providers output, list of default providers (malloc'ed array)
+ * \param size output, number of providers
* \return list of available font providers (user owns the returned array)
*/
void ass_get_available_font_providers(ASS_Library *priv,