]> git.sesse.net Git - vlc/blobdiff - src/video_output/vout_subpictures.c
MKV USF subtitles support and other Subtitles improvements.
[vlc] / src / video_output / vout_subpictures.c
index fb412a8ffc0200c977223bd0c907d22b7d689aa4..d16716859575539d79a6fd0cdc4ca7b8a4ba1c70 100644 (file)
@@ -629,12 +629,20 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
 
             if( p_region->fmt.i_chroma == VLC_FOURCC('T','E','X','T') )
             {
-                if( p_spu->p_text && p_spu->p_text->p_module &&
-                    p_spu->p_text->pf_render_text )
+                if( p_spu->p_text && p_spu->p_text->p_module )
                 {
                     p_region->i_align = p_subpic->i_flags;
-                    p_spu->p_text->pf_render_text( p_spu->p_text,
-                                                   p_region, p_region ); 
+
+                    if( p_spu->p_text->pf_render_html && p_region->psz_html )
+                    {
+                        p_spu->p_text->pf_render_html( p_spu->p_text,
+                                                       p_region, p_region );
+                    }
+                    else if( p_spu->p_text->pf_render_text )
+                    {
+                        p_spu->p_text->pf_render_text( p_spu->p_text,
+                                                       p_region, p_region ); 
+                    }
                 }
             }