Commit 1395c868 authored by Barry Wardell's avatar Barry Wardell Committed by Jean-Baptiste Kempf

Update SSA/ASS subtitle decoder for the new version of libass included in contribs.

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
(cherry picked from commit b670356d)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 18df9b1a
......@@ -343,7 +343,11 @@ static void UpdateRegions( spu_t *p_spu, subpicture_t *p_subpic,
if( b_fmt_changed )
{
ass_set_frame_size( p_ass->p_renderer, fmt.i_width, fmt.i_height );
ass_set_aspect_ratio( p_ass->p_renderer, 1.0 ); // TODO ?
#if defined( LIBASS_VERSION ) && LIBASS_VERSION >= 0x00907000
ass_set_aspect_ratio( p_ass->p_renderer, 1.0, 1.0 ); // TODO ?
#else
ass_set_aspect_ratio( p_ass->p_renderer, 1.0 ); // TODO ?
#endif
p_ass->fmt = fmt;
}
......@@ -745,13 +749,21 @@ static ass_handle_t *AssHandleHold( decoder_t *p_dec )
#ifdef WIN32
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, 0 ); // setup default font/family
#else
ass_set_fonts( p_renderer, psz_font, psz_family ); // setup default font/family
#endif
#ifdef WIN32
dialog_ProgressSet( p_dialog, NULL, 1.0 );
#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, 0 );
#else
ass_set_fonts_nofc( p_renderer, psz_font, psz_family );
#endif
#endif
memset( &p_ass->fmt, 0, sizeof(p_ass->fmt) );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment