[vlc-commits] Required libass 0.9.8

Laurent Aimar git at videolan.org
Wed Apr 20 00:04:47 CEST 2011


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Apr 19 23:00:24 2011 +0200| [0202d37d150c7dce7f49d868dd2a2860397bd184] | committer: Laurent Aimar

Required libass 0.9.8

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

 configure.ac           |    2 +-
 modules/codec/libass.c |   23 +----------------------
 2 files changed, 2 insertions(+), 23 deletions(-)

diff --git a/configure.ac b/configure.ac
index e0d043c..8275155 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2980,7 +2980,7 @@ dnl
 AC_ARG_ENABLE(libass,
   [  --enable-libass         Subtitle support using libass (default enabled)])
 AS_IF( [test "${enable_libass}" != "no"], [
-  PKG_CHECK_MODULES(LIBASS, libass >= 0.9.6,
+  PKG_CHECK_MODULES(LIBASS, libass >= 0.9.8,
       [
         VLC_ADD_LIBS([libass],[$LIBASS_LIBS])
         VLC_ADD_CFLAGS([libass],[$LIBASS_CFLAGS])
diff --git a/modules/codec/libass.c b/modules/codec/libass.c
index ec1ed47..df347f0 100644
--- a/modules/codec/libass.c
+++ b/modules/codec/libass.c
@@ -46,14 +46,6 @@
 #   include <vlc_charset.h>
 #endif
 
-/* Compatibility with old libass */
-#if !defined(LIBASS_VERSION) || LIBASS_VERSION < 0x00907010
-#   define ASS_Renderer    ass_renderer_t
-#   define ASS_Library     ass_library_t
-#   define ASS_Track       ass_track_t
-#   define ASS_Image       ass_image_t
-#endif
-
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
@@ -337,12 +329,7 @@ static int SubpictureValidate( subpicture_t *p_subpic,
         ass_set_frame_size( p_ass->p_renderer, fmt.i_width, fmt.i_height );
         const double src_ratio = (double)p_fmt_src->i_width / p_fmt_src->i_height;
         const double dst_ratio = (double)p_fmt_dst->i_width / p_fmt_dst->i_height;
-        const double factor    = dst_ratio / src_ratio;
-#if defined( LIBASS_VERSION ) && LIBASS_VERSION >= 0x00907000
-        ass_set_aspect_ratio( p_ass->p_renderer, factor, 1 );
-#else
-        ass_set_aspect_ratio( p_ass->p_renderer, factor );
-#endif
+        ass_set_aspect_ratio( p_ass->p_renderer, dst_ratio / src_ratio, 1 );
         p_ass->fmt = fmt;
     }
 
@@ -744,11 +731,7 @@ static ass_handle_t *AssHandleHold( decoder_t *p_dec )
     if( p_dialog )
         dialog_ProgressSet( p_dialog, NULL, 0.2 );
 #endif
-#if defined( LIBASS_VERSION ) && LIBASS_VERSION >= 0x00907000
     ass_set_fonts( p_renderer, psz_font, psz_family, true, NULL, 1 );  // setup default font/family
-#else
-    ass_set_fonts( p_renderer, psz_font, psz_family );  // setup default font/family
-#endif
 #ifdef WIN32
     if( p_dialog )
     {
@@ -759,11 +742,7 @@ static ass_handle_t *AssHandleHold( decoder_t *p_dec )
 #endif
 #else
     /* FIXME you HAVE to give him a font if no fontconfig */
-#if defined( LIBASS_VERSION ) && LIBASS_VERSION >= 0x00907000
     ass_set_fonts( p_renderer, psz_font, psz_family, false, NULL, 1 );
-#else
-    ass_set_fonts_nofc( p_renderer, psz_font, psz_family );
-#endif
 #endif
     memset( &p_ass->fmt, 0, sizeof(p_ass->fmt) );
 



More information about the vlc-commits mailing list