From 3e0a2705595cbf991e0428984052488ad94c6d21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Fri, 2 Sep 2011 00:45:38 +0200 Subject: subassconvert: handle "\r\n" line ends Previously the code converting text subtitles to ASS format converted newline characters, and only those, to ASS "new line" markup. If the subtitles contained "\r\n", the "\r" was thus left in the text. In previous libass versions the "\r" was not visible, but in the current one it produces an empty box. Improve the conversion to remove the "\r" in that case. Also treat a lone "\r" as a newline. --- sub/subassconvert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sub') diff --git a/sub/subassconvert.c b/sub/subassconvert.c index 773cb7f4d7..2a56b46022 100644 --- a/sub/subassconvert.c +++ b/sub/subassconvert.c @@ -88,7 +88,7 @@ static const struct tag_conv { {"", "{\\u1}"}, {"", "{\\u0}"}, {"", "{\\s1}"}, {"", "{\\s0}"}, {"{", "\\{"}, {"}", "\\}"}, - {"\n", "\\N"} + {"\r\n", "\\N"}, {"\n", "\\N"}, {"\r", "\\N"}, }; static const struct { -- cgit v1.2.3