mirror of https://code.videolan.org/videolan/vlc
Merge branch 'mr070701' into 'master'
codec: libass: add support for sub-text-scale See merge request videolan/vlc!376
This commit is contained in:
commit
2a65900825
|
@ -84,6 +84,7 @@ typedef struct
|
|||
int i_refcount;
|
||||
|
||||
/* */
|
||||
vlc_object_t *p_obj;
|
||||
ASS_Library *p_library;
|
||||
ASS_Renderer *p_renderer;
|
||||
|
||||
|
@ -275,6 +276,7 @@ static int Create( vlc_object_t *p_this )
|
|||
ass_process_codec_private( p_track, p_dec->fmt_in->p_extra, p_dec->fmt_in->i_extra );
|
||||
OldEngineClunkyRollInfoPatch( p_dec, p_track );
|
||||
|
||||
p_sys->p_obj = VLC_OBJECT(p_dec);
|
||||
p_dec->fmt_out.i_codec = VLC_CODEC_RGBA;
|
||||
|
||||
return VLC_SUCCESS;
|
||||
|
@ -300,6 +302,7 @@ static void DecSysRelease( decoder_sys_t *p_sys )
|
|||
{
|
||||
/* */
|
||||
vlc_mutex_lock( &p_sys->lock );
|
||||
p_sys->p_obj = NULL;
|
||||
p_sys->i_refcount--;
|
||||
if( p_sys->i_refcount > 0 )
|
||||
{
|
||||
|
@ -444,6 +447,12 @@ static void SubpictureUpdate( subpicture_t *p_subpic,
|
|||
#endif
|
||||
}
|
||||
|
||||
if( p_sys->p_obj )
|
||||
{
|
||||
int scale = var_InheritInteger( p_sys->p_obj, "sub-text-scale" );
|
||||
ass_set_font_scale( p_sys->p_renderer, scale / 100.0 );
|
||||
}
|
||||
|
||||
/* */
|
||||
const vlc_tick_t i_stream_date = p_spusys->i_pts + (i_ts - p_subpic->i_start);
|
||||
int i_changed;
|
||||
|
|
Loading…
Reference in New Issue