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.
This commit is contained in:
Clément Bœsch 2011-09-02 00:45:38 +02:00 committed by Uoti Urpala
parent 5a13d47b97
commit 3e0a270559
1 changed files with 1 additions and 1 deletions

View File

@ -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 {