On Sun, Oct 11, 2015 at 05:11:01PM +0100, Ricardo Constantino wrote: > Bare ampersand characters are still accepted, even though out-of-spec. > Also fixes adjacent tags not being parsed. > > Fixes trac #4915 > > Signed-off-by: Ricardo Constantino <wiia...@gmail.com> > --- > libavcodec/webvttdec.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/webvttdec.c b/libavcodec/webvttdec.c > index 1284a17..fb1a422 100644 > --- a/libavcodec/webvttdec.c > +++ b/libavcodec/webvttdec.c > @@ -37,11 +37,14 @@ static const struct { > {"<b>", "{\\b1}"}, {"</b>", "{\\b0}"}, > {"<u>", "{\\u1}"}, {"</u>", "{\\u0}"}, > {"{", "\\{"}, {"}", "\\}"}, // escape to avoid ASS markup conflicts > + {">", ">"}, {"<", "<"}, > + {"‎", ""}, {"‏", ""}, // FIXME: properly honor bidi marks > + {"&", "&"}, {" ", "\\h"}, > }; > > static int webvtt_event_to_ass(AVBPrint *buf, const char *p) > { > - int i, skip = 0; > + int i, again, skip = 0; > > while (*p) { > > @@ -51,12 +54,18 @@ static int webvtt_event_to_ass(AVBPrint *buf, const char > *p) > if (!strncmp(p, from, len)) { > av_bprintf(buf, "%s", webvtt_tag_replace[i].to); > p += len; > + again = 1; > break; > } > } > if (!*p) > break; > > + if (again) { > + again = 0; > + skip = 0; > + continue; > + } > if (*p == '<') > skip = 1; > else if (*p == '>')
Applied, thanks -- Clément B.
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel