aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Clément Bœsch <ubitux@gmail.com>2011-09-02 00:45:38 +0200
committerGravatar Uoti Urpala <uau@mplayer2.org>2011-09-02 12:22:15 +0300
commit3e0a2705595cbf991e0428984052488ad94c6d21 (patch)
treebad9cee46593f74c9e09f46200b0ca7eed1e56df
parent5a13d47b972ec9be4d324d4ad84c20a1cf046ade (diff)
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.
-rw-r--r--sub/subassconvert.c2
1 files changed, 1 insertions, 1 deletions
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 {
{"<u>", "{\\u1}"}, {"</u>", "{\\u0}"},
{"<s>", "{\\s1}"}, {"</s>", "{\\s0}"},
{"{", "\\{"}, {"}", "\\}"},
- {"\n", "\\N"}
+ {"\r\n", "\\N"}, {"\n", "\\N"}, {"\r", "\\N"},
};
static const struct {