[vlc-commits] Subtitles: font attributes can use ''

Jean-Baptiste Kempf git at videolan.org
Sun Apr 29 23:49:12 CEST 2012


vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Apr 29 21:40:17 2012 +0200| [d7239098ffce302245d7dc87248baadae0cb08d8] | committer: Jean-Baptiste Kempf

Subtitles: font attributes can use ''

Ref #6720
(cherry picked from commit afdbf36588d83320059d400c9a7cf674a15ac257)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=d7239098ffce302245d7dc87248baadae0cb08d8
---

 modules/codec/subsdec.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/modules/codec/subsdec.c b/modules/codec/subsdec.c
index abdac8a..6c81d93 100644
--- a/modules/codec/subsdec.c
+++ b/modules/codec/subsdec.c
@@ -679,6 +679,11 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle )
                                 psz_subtitle++;
                                 i_len = strcspn( psz_subtitle, "\"" );
                             }
+                            else if( *psz_subtitle == '\'' )
+                            {
+                                psz_subtitle++;
+                                i_len = strcspn( psz_subtitle, "'" );
+                            }
                             else
                             {
                                 i_len = strcspn( psz_subtitle, " \t>" );
@@ -688,7 +693,7 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle )
                             HtmlPut( &psz_html, "\"" );
 
                             psz_subtitle += i_len;
-                            if( *psz_subtitle == '\"' )
+                            if( *psz_subtitle == '\"' || *psz_subtitle == '\'' )
                                 psz_subtitle++;
                             break;
                         }



More information about the vlc-commits mailing list