vlc | branch: master | Hugo Beauzée-Luyssen <[email protected]> | Wed Jul 22 13:17:47 2015 +0200| [551d9d308758555bf36784d4d244eea503fd2c19] | committer: Jean-Baptiste Kempf
subsdec: Remove space trimming code, the renderer already handles it > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=551d9d308758555bf36784d4d244eea503fd2c19 --- modules/codec/subsdec.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/modules/codec/subsdec.c b/modules/codec/subsdec.c index a96bb6a..c25ecce 100644 --- a/modules/codec/subsdec.c +++ b/modules/codec/subsdec.c @@ -941,9 +941,6 @@ static text_segment_t* ParseSubtitles( int *pi_align, const char *psz_subtitle ) bool b_has_align = false; - while ( *psz_subtitle == ' ' ) - psz_subtitle++; - /* */ while( *psz_subtitle ) { @@ -1168,28 +1165,8 @@ static text_segment_t* ParseSubtitles( int *pi_align, const char *psz_subtitle ) goto fail; psz_subtitle += 2; } - else if ( *psz_subtitle == ' ' ) - { - const char *psz_current = psz_subtitle; - // Check if we need to trim EOL spaces - while ( *psz_current == ' ' ) - psz_current++; - if ( *psz_current == '\n' || *psz_current == 0 ) - psz_subtitle = psz_current; - else - { - // Avoid continuing and iterating over spaces for each main loop iteration. - // Just get done with it here. - while ( *psz_subtitle == ' ' ) - { - AppendCharacter( p_segment, ' ' ); - psz_subtitle++; - } - } - } else { - //FIXME: Highly inneficient AppendCharacter( p_segment, *psz_subtitle ); psz_subtitle++; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
