[vlc-commits] [Git][videolan/vlc][master] codec/libass: register a message callback
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Sep 26 05:45:09 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
22479ecf by Sean McGovern at 2026-09-26T05:25:49+00:00
codec/libass: register a message callback
By default, libass logs messages to standard output.
Instead, let's properly place it in the message log.
libass does not expose it's logging levels in a public
header, so everything will currently be logged at DEBUG.
- - - - -
1 changed file:
- modules/codec/libass.c
Changes:
=====================================
modules/codec/libass.c
=====================================
@@ -28,6 +28,7 @@
# include "config.h"
#endif
+#include <stdarg.h>
#include <string.h>
#include <limits.h>
#include <assert.h>
@@ -39,6 +40,7 @@
#include <vlc_input.h>
#include <vlc_dialog.h>
#include <vlc_stream.h>
+#include <vlc_messages.h>
#include <ass/ass.h>
@@ -117,6 +119,11 @@ static void OldEngineClunkyRollInfoPatch( decoder_t *p_dec, ASS_Track * );
//#define DEBUG_REGION
+static void vlc_ass_msg_handler(int level, const char *fmt, va_list va, void *data) {
+ decoder_t *p_dec = data;
+ msg_GenericVa( p_dec, VLC_MSG_DBG, fmt, va );
+}
+
/*****************************************************************************
* Create: Open libass decoder.
*****************************************************************************/
@@ -153,6 +160,8 @@ static int Create( vlc_object_t *p_this )
return VLC_EGENERIC;
}
+ ass_set_message_cb(p_library, vlc_ass_msg_handler, p_dec);
+
/* load attachments */
input_attachment_t **pp_attachments;
int i_attachments;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/22479ecffc01bb4e6ad8ddedff257a1d8c7820a5
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/22479ecffc01bb4e6ad8ddedff257a1d8c7820a5
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list