Given that we both wanted to post a patch (but didn't know the mailing list was moderated for registered users), I think the best thing to do is to have a single thread, so please discard the other messages that had/could appear(ed).
<br><br>Here's my take on it :<br><br><br>---
subsdec.c 2007-02-03 15:32:39.000000000 +0100<br>+++ subsdec-modif.c 2007-02-03 15:39:19.000000000 +0100<br>@@ -487,16 +487,19 @@<br> i_text++;<br> psz_buffer_sub += 2;<br> }<br>- else if( psz_buffer_sub[0] == '{' &&
<br>- psz_buffer_sub[1] == '\\' )<br>+ else if( psz_buffer_sub[1] == '{' &&<br>+ psz_buffer_sub[0] != '\\' )<br> {<br>- /* SSA control code */
<br>- while( psz_buffer_sub[0] != '\0' &&<br>- psz_buffer_sub[0] != '}' )<br>+ /* We don't need to show SSA comments, so we strip them */<br>+ psz_new_subtitle[i_text] = psz_buffer_sub[0];
<br>+ psz_buffer_sub++;<br>+ while( psz_buffer_sub[1] != '\0' &&<br>+ (psz_buffer_sub[1] != '}' ||<br>+ psz_buffer_sub[0] == '\\' ))
<br> {<br> psz_buffer_sub++;<br> }<br>- psz_buffer_sub++;<br>+ psz_buffer_sub+=2;<br> }<br> else<br> {<br><br><br>There's a few avantages with this method :
<br>- No new variables/flags<br>- No checking for special characters (ex \n) inside the comments, so we can avoid voluntary breaking of VLC<br>- The character { or } can be used if precede by a backslash (eg " \{this is not a comment\}")
<br><br>Please review it, as this is the first time i've hacked VLC<br><br>Gwenolé LE PACHE <br>