[vlc-commits] codec: webvtt: encode ruby
Francois Cartegnie
git at videolan.org
Mon Feb 19 15:30:08 CET 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Feb 19 15:29:24 2018 +0100| [3622e97390b4078a36ce1cb6b1e491b371404a0f] | committer: Francois Cartegnie
codec: webvtt: encode ruby
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3622e97390b4078a36ce1cb6b1e491b371404a0f
---
modules/codec/webvtt/encvtt.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/modules/codec/webvtt/encvtt.c b/modules/codec/webvtt/encvtt.c
index 8f6e8f380c..056be393a7 100644
--- a/modules/codec/webvtt/encvtt.c
+++ b/modules/codec/webvtt/encvtt.c
@@ -114,6 +114,21 @@ static block_t *Encode( encoder_t *p_enc, subpicture_t *p_spu )
if( p_segment->psz_text == NULL )
continue;
+ if( p_segment->p_ruby )
+ {
+ bo_add_mem( &box, 6, "<ruby>" );
+ for( const text_segment_ruby_t *p_ruby = p_segment->p_ruby;
+ p_ruby; p_ruby = p_ruby->p_next )
+ {
+ WriteText( p_ruby->psz_base, &box, &prevchar );
+ bo_add_mem( &box, 4, "<rt>" );
+ WriteText( p_ruby->psz_rt, &box, &prevchar );
+ bo_add_mem( &box, 5, "</rt>" );
+ }
+ bo_add_mem( &box, 7, "</ruby>" );
+ continue;
+ }
+
const text_style_t *style = p_segment->style;
if( style && style->i_features )
{
More information about the vlc-commits
mailing list