[MPlayer-dev-eng] [PATCH] subreader: do not skip the first char of ASS fields.

Nicolas George nicolas.george at normalesup.org
Sun Nov 18 14:02:06 CET 2012


Without this change, fields that can be sometimes empty and
sometimes not, such as the Effect field, are counted in an
inconsistent way. Since the number of fields is used to find
where the text starts, it leads to internal field arriving
on the video.

Bug reported anonymously on the users mailing list.
---
 sub/subreader.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sub/subreader.c b/sub/subreader.c
index f55307d..73e9b80 100644
--- a/sub/subreader.c
+++ b/sub/subreader.c
@@ -677,7 +677,7 @@ static subtitle *sub_read_line_ssa(stream_t *st,subtitle *current, int utf16) {
             tmp = line2;
             if(!(tmp=strchr(++tmp, ','))) break;
             if(brace && brace < tmp) break; // comma inside command
-            if(*(++tmp) == ' ') break;
+            if(tmp[1] == ' ') break;
                   /* a space after a comma means we're already in a sentence */
             line2 = tmp;
           }
-- 
1.7.10.4



More information about the MPlayer-dev-eng mailing list