summaryrefslogtreecommitdiffstats
path: root/libass/ass_library.c
diff options
context:
space:
mode:
Diffstat (limited to 'libass/ass_library.c')
-rw-r--r--libass/ass_library.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/libass/ass_library.c b/libass/ass_library.c
index 2a8f5b2..9b6da02 100644
--- a/libass/ass_library.c
+++ b/libass/ass_library.c
@@ -28,7 +28,7 @@
#include "ass_library.h"
#include "ass_utils.h"
-static void ass_msg_handler(int level, char *fmt, va_list *va)
+static void ass_msg_handler(int level, char *fmt, va_list *va, void *data)
{
if (level > MSGL_INFO)
return;
@@ -132,11 +132,17 @@ void ass_clear_fonts(ass_library_t *priv)
* Register a message callback function with libass. Without setting one,
* a default handler is used which prints everything with MSGL_INFO or
* higher to the standard output.
+ *
+ * \param msg_cb the callback function
+ * \param data additional data that will be passed to the callback
*/
void ass_set_message_cb(ass_library_t *priv,
- void (*msg_cb)(int, char *, va_list *))
+ void (*msg_cb)(int, char *, va_list *, void *),
+ void *data)
{
- if (msg_cb)
+ if (msg_cb) {
priv->msg_callback = msg_cb;
+ priv->msg_callback_data = data;
+ }
}