diff options
author | wm4 <wm4@mplayer2.org> | 2012-04-16 23:00:19 +0200 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2012-04-17 01:27:22 +0300 |
commit | f0ce95607f566d288674f317176c51bcda026a9d (patch) | |
tree | 81696806891d06fb7de50e55dd32a86117d965e7 /bstr.h | |
parent | aadf1002f8aa3a5813fd13ad18b8907b82068811 (diff) | |
download | mpv-f0ce95607f566d288674f317176c51bcda026a9d.tar.bz2 mpv-f0ce95607f566d288674f317176c51bcda026a9d.tar.xz |
subassconvert: handle unquoted attributes in subrip font tags
Previously, mplayer didn't convert tags like <font color=#00FF00>. But
such subtitles exist in the wild, and should be handled.
Diffstat (limited to 'bstr.h')
-rw-r--r-- | bstr.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -82,6 +82,9 @@ int bstr_decode_utf8(struct bstr str, struct bstr *out_next); // On error, -1 is returned. On success, it returns a value in the range [1, 4]. int bstr_parse_utf8_code_length(unsigned char b); +// If s starts with prefix, return true and return the rest of the string in s. +bool bstr_eatstart(struct bstr *s, struct bstr prefix); + static inline struct bstr bstr_cut(struct bstr str, int n) { if (n > str.len) |