[vlc-commits] Revert "libass: add message callback"

Laurent Aimar git at videolan.org
Tue Sep 13 22:59:27 CEST 2011


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Sep 13 22:56:38 2011 +0200| [d675b5e29639c0578bb0c0f1be1936dc7183342b] | committer: Laurent Aimar

Revert "libass: add message callback"

This reverts commit 3e6913a3f4a5496bb44435cc0dc0c9eacdb71a28.

The decoder object can be destroyed before libass is and so cannot be
used for logging.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d675b5e29639c0578bb0c0f1be1936dc7183342b
---

 modules/codec/libass.c |   20 --------------------
 1 files changed, 0 insertions(+), 20 deletions(-)

diff --git a/modules/codec/libass.c b/modules/codec/libass.c
index 123da1f..cc3f05a 100644
--- a/modules/codec/libass.c
+++ b/modules/codec/libass.c
@@ -120,23 +120,6 @@ static void RegionDraw( subpicture_region_t *p_region, ASS_Image *p_img );
 
 //#define DEBUG_REGION
 
-static void MessageCallback( int level, const char *fmt, va_list args, void *data )
-{
-    decoder_t *p_dec = (decoder_t *)data;
-
-    // translate verbosity level
-    if( level > 6 )
-        return;
-    else if( level > 4 )
-        level = VLC_MSG_DBG;
-    else if( level > 1 )
-        level = VLC_MSG_WARN;
-    else
-        level = VLC_MSG_ERR;
-
-    msg_GenericVa( p_dec, level, MODULE_STRING, fmt, args );
-}
-
 /*****************************************************************************
  * Create: Open libass decoder.
  *****************************************************************************/
@@ -172,9 +155,6 @@ static int Create( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
-    /* Add message callback for logging */
-    ass_set_message_cb( p_sys->p_library, MessageCallback, p_dec );
-
     /* load attachments */
     input_attachment_t  **pp_attachments;
     int                   i_attachments;



More information about the vlc-commits mailing list