diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2011-05-19 09:11:56 +0000 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-06-29 11:28:46 +0300 |
commit | 27b88a09c5319deb62221b8cd0ecc14cd1136e4a (patch) | |
tree | 8f1d935ca6b953bcdaa70866022bc44c3171443c /sub/subreader.c | |
parent | dc6fe9692b30015c543f2ba2dbec8c8bc95a97b3 (diff) | |
download | mpv-27b88a09c5319deb62221b8cd0ecc14cd1136e4a.tar.bz2 mpv-27b88a09c5319deb62221b8cd0ecc14cd1136e4a.tar.xz |
subreader: SAMI subs: wrap line if needed
Start a new line if there's no space left to append to the previous
one.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33471 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'sub/subreader.c')
-rw-r--r-- | sub/subreader.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sub/subreader.c b/sub/subreader.c index 6acecb5c54..a1d2974af4 100644 --- a/sub/subreader.c +++ b/sub/subreader.c @@ -177,6 +177,8 @@ static subtitle *sub_read_line_sami(stream_t* st, subtitle *current, break; case 3: /* get all text until '<' appears */ + if (p - text >= LINE_LEN) + sami_add_line(current, text, &p); if (*s == '\0') break; else if (!strncasecmp (s, "<br>", 4)) { sami_add_line(current, text, &p); |