[vlc-commits] Video filters: move to text_segment
Jean-Baptiste Kempf
git at videolan.org
Tue Jul 28 16:01:57 CEST 2015
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun May 3 15:49:55 2015 +0200| [337ac422026e6439b80060b537f8386c3df2403d] | committer: Jean-Baptiste Kempf
Video filters: move to text_segment
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=337ac422026e6439b80060b537f8386c3df2403d
---
modules/video_filter/dynamicoverlay/dynamicoverlay.c | 2 +-
modules/video_filter/marq.c | 2 +-
modules/video_filter/rss.c | 2 +-
modules/video_filter/subsdelay.c | 10 +++++-----
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/modules/video_filter/dynamicoverlay/dynamicoverlay.c b/modules/video_filter/dynamicoverlay/dynamicoverlay.c
index 1a2f0ab..2dd34b8 100644
--- a/modules/video_filter/dynamicoverlay/dynamicoverlay.c
+++ b/modules/video_filter/dynamicoverlay/dynamicoverlay.c
@@ -364,7 +364,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
if( p_overlay->format.i_chroma == VLC_CODEC_TEXT )
{
- p_region->psz_text = strdup( p_overlay->data.p_text );
+ p_region->p_text = text_segment_New( p_overlay->data.p_text );
p_region->p_style = text_style_Duplicate( p_overlay->p_fontstyle );
}
else
diff --git a/modules/video_filter/marq.c b/modules/video_filter/marq.c
index 9618c7c..d35234b 100644
--- a/modules/video_filter/marq.c
+++ b/modules/video_filter/marq.c
@@ -310,7 +310,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
p_sys->last_time = date;
- p_spu->p_region->psz_text = strdup( msg );
+ p_spu->p_region->p_text = text_segment_New( msg );
p_spu->i_start = date;
p_spu->i_stop = p_sys->i_timeout == 0 ? 0 : date + p_sys->i_timeout * 1000;
p_spu->b_ephemer = true;
diff --git a/modules/video_filter/rss.c b/modules/video_filter/rss.c
index 16b6ba3..d7d8512 100644
--- a/modules/video_filter/rss.c
+++ b/modules/video_filter/rss.c
@@ -479,7 +479,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
free( a2 );
}
- p_spu->p_region->psz_text = strdup(p_sys->psz_marquee);
+ p_spu->p_region->p_text = text_segment_New(p_sys->psz_marquee);
if( p_sys->p_style->i_font_size > 0 )
p_spu->p_region->fmt.i_visible_height = p_sys->p_style->i_font_size;
p_spu->i_start = date;
diff --git a/modules/video_filter/subsdelay.c b/modules/video_filter/subsdelay.c
index be727cf..808df39 100644
--- a/modules/video_filter/subsdelay.c
+++ b/modules/video_filter/subsdelay.c
@@ -1053,7 +1053,7 @@ static void SubpicLocalUpdate( subpicture_t* p_subpic, mtime_t i_ts )
if( p_entry->b_check_empty && p_subpic->p_region )
{
if( SubsdelayIsTextEmpty( p_subpic->p_region->psz_html ) ||
- SubsdelayIsTextEmpty( p_subpic->p_region->psz_text ) )
+ SubsdelayIsTextEmpty( p_subpic->p_region->p_text->psz_text ) )
{
/* remove empty subtitle */
@@ -1117,7 +1117,7 @@ static void SubpicLocalUpdate( subpicture_t* p_subpic, mtime_t i_ts )
static bool SubpicIsEmpty( subpicture_t* p_subpic )
{
return ( p_subpic->p_region && ( SubsdelayIsTextEmpty( p_subpic->p_region->psz_html ) ||
- SubsdelayIsTextEmpty( p_subpic->p_region->psz_text ) ) );
+ SubsdelayIsTextEmpty( p_subpic->p_region->p_text->psz_text ) ) );
}
/*****************************************************************************
@@ -1180,12 +1180,12 @@ static int64_t SubsdelayEstimateDelay( filter_t *p_filter, subsdelay_heap_entry_
if( i_mode == SUBSDELAY_MODE_RELATIVE_SOURCE_CONTENT )
{
- if( p_entry->p_subpic && p_entry->p_subpic->p_region && ( p_entry->p_subpic->p_region->psz_text
+ if( p_entry->p_subpic && p_entry->p_subpic->p_region && ( p_entry->p_subpic->p_region->p_text->psz_text
|| p_entry->p_subpic->p_region->psz_html ) )
{
- if( p_entry->p_subpic->p_region->psz_text )
+ if( p_entry->p_subpic->p_region->p_text->psz_text )
{
- i_rank = SubsdelayGetTextRank( p_entry->p_subpic->p_region->psz_text );
+ i_rank = SubsdelayGetTextRank( p_entry->p_subpic->p_region->p_text->psz_text );
}
else
{
More information about the vlc-commits
mailing list