1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-22 06:42:03 +00:00

osd: don't skip leading whitespace on the first line either

Stupid libass.
This commit is contained in:
wm4 2017-11-02 16:46:09 +01:00
parent ff17760c00
commit f099f504af

View File

@ -209,7 +209,7 @@ static void mangle_ass(bstr *dst, const char *in)
if (escape_ass && *in == '{')
bstr_xappend(NULL, dst, bstr0("\\"));
// Libass will strip leading whitespace
if (in[0] == ' ' && in != start && in[-1] == '\n') {
if (in[0] == ' ' && (in == start || in[-1] == '\n')) {
bstr_xappend(NULL, dst, bstr0("\\h"));
in += 1;
continue;