[vlc-commits] codec: substx3g: merge w/overwrite instead of replace
Francois Cartegnie
git at videolan.org
Tue Jan 2 17:19:06 CET 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Jan 2 16:56:26 2018 +0100| [56f5aa0158dee247c303a8fefc5788c99959f262] | committer: Francois Cartegnie
codec: substx3g: merge w/overwrite instead of replace
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=56f5aa0158dee247c303a8fefc5788c99959f262
---
modules/codec/substx3g.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/codec/substx3g.c b/modules/codec/substx3g.c
index 148f065111..94ad294410 100644
--- a/modules/codec/substx3g.c
+++ b/modules/codec/substx3g.c
@@ -241,8 +241,10 @@ static bool SegmentSplit( tx3g_segment_t *p_prev, tx3g_segment_t **pp_segment,
else
p_segment_middle->p_next3g = p_next3g;
- text_style_Delete( p_segment_middle->s->style );
- p_segment_middle->s->style = text_style_Duplicate( p_styles );
+ if( p_segment_middle->s->style )
+ text_style_Merge( p_segment_middle->s->style, p_styles, true );
+ else
+ p_segment_middle->s->style = text_style_Duplicate( p_styles );
return true;
}
More information about the vlc-commits
mailing list