Skip to content
Snippets Groups Projects
Commit 49a2c040 authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

Remove libass patch that has been merged upstream

parent a87a43fe
No related branches found
No related tags found
1 merge request!1139Bump libs to 3.4.5 / 0.9.5
From c99c1440760b4da7fc0bb038d1d77ade3175e83b Mon Sep 17 00:00:00 2001
Message-Id: <c99c1440760b4da7fc0bb038d1d77ade3175e83b.1628587500.git.thomas@gllm.fr>
In-Reply-To: <725e37106e83190ea20042aa9dc01c1c7646b37d.1628587500.git.thomas@gllm.fr>
References: <725e37106e83190ea20042aa9dc01c1c7646b37d.1628587500.git.thomas@gllm.fr>
From: Francois Cartegnie <fcvlcdev@free.fr>
Date: Tue, 20 Jul 2021 21:23:13 +0200
Subject: [PATCH 11/13] Revert "codec: libass: add support for sub-text-scale"
This reverts commit 72fd3b20f855198959e0dfb6b331acc5cb4502c6.
we can't recurse object tree properly
---
modules/codec/libass.c | 35 -----------------------------------
1 file changed, 35 deletions(-)
diff --git a/modules/codec/libass.c b/modules/codec/libass.c
index 79cd0615c0..b60f6946e4 100644
--- a/modules/codec/libass.c
+++ b/modules/codec/libass.c
@@ -78,14 +78,12 @@ static void Flush( decoder_t * );
struct decoder_sys_t
{
mtime_t i_max_stop;
- int i_scale;
/* The following fields of decoder_sys_t are shared between decoder and spu units */
vlc_mutex_t lock;
int i_refcount;
/* */
- vlc_object_t *p_callbackobj;
ASS_Library *p_library;
ASS_Renderer *p_renderer;
video_format_t fmt;
@@ -128,19 +126,6 @@ typedef struct
static int BuildRegions( rectangle_t *p_region, int i_max_region, ASS_Image *p_img_list, int i_width, int i_height );
static void RegionDraw( subpicture_region_t *p_region, ASS_Image *p_img );
-static int ScalingCallback (vlc_object_t *obj, const char *var,
- vlc_value_t old, vlc_value_t cur, void *data)
-{
- decoder_sys_t *p_sys = data;
- VLC_UNUSED(obj);
- VLC_UNUSED(var);
- VLC_UNUSED(old);
- vlc_mutex_lock(&p_sys->lock);
- p_sys->i_scale = cur.i_int;
- vlc_mutex_unlock(&p_sys->lock);
- return VLC_SUCCESS;
-}
-
//#define DEBUG_REGION
/*****************************************************************************
@@ -166,7 +151,6 @@ static int Create( vlc_object_t *p_this )
p_sys->i_refcount = 1;
memset( &p_sys->fmt, 0, sizeof(p_sys->fmt) );
p_sys->i_max_stop = VLC_TS_INVALID;
- p_sys->i_scale = var_InheritInteger( p_dec, "sub-text-scale" );
p_sys->p_library = NULL;
p_sys->p_renderer = NULL;
p_sys->p_track = NULL;
@@ -298,18 +282,6 @@ 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 );
- vlc_value_t val;
- for ( vlc_object_t *obj = p_dec; obj; obj = obj->obj.parent )
- {
- if( var_GetChecked( obj, "sub-text-scale" ,
- VLC_VAR_INTEGER, &val ) == VLC_SUCCESS )
- {
- var_AddCallback( obj, "sub-text-scale", ScalingCallback, p_sys );
- p_sys->p_callbackobj = obj;
- break;
- }
- }
-
p_dec->fmt_out.i_codec = VLC_CODEC_RGBA;
return VLC_SUCCESS;
@@ -342,11 +314,6 @@ static void DecSysRelease( decoder_sys_t *p_sys )
return;
}
vlc_mutex_unlock( &p_sys->lock );
-
- if( p_sys->p_callbackobj )
- var_DelCallback( p_sys->p_callbackobj, "sub-text-scale",
- ScalingCallback, p_sys );
-
vlc_mutex_destroy( &p_sys->lock );
if( p_sys->p_track )
@@ -479,8 +446,6 @@ static int SubpictureValidate( subpicture_t *p_subpic,
p_sys->fmt = fmt;
}
- ass_set_font_scale( p_sys->p_renderer, p_sys->i_scale / 100.0 );
-
/* */
const mtime_t i_stream_date = p_subpic->updater.p_sys->i_pts + (i_ts - p_subpic->i_start);
int i_changed;
--
2.30.2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment