changeset 34757:da38eb1e2069

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. Picked from mplayer2/3e0a2705
author cboesch
date Sat, 07 Apr 2012 11:17:09 +0000
parents df3ff52039fe
children e301516e3c83
files sub/subassconvert.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sub/subassconvert.c	Sat Apr 07 00:10:27 2012 +0000
+++ b/sub/subassconvert.c	Sat Apr 07 11:17:09 2012 +0000
@@ -86,7 +86,7 @@
     {"<u>", "{\\u1}"}, {"</u>", "{\\u0}"},
     {"<s>", "{\\s1}"}, {"</s>", "{\\s0}"},
     {"{", "\\{"}, {"}", "\\}"},
-    {"\n", "\\N"}
+    {"\r\n", "\\N"}, {"\n", "\\N"}, {"\r", "\\N"},
 };
 
 static const struct {