mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/webvttdec: Accept \r as newline
After parsing the end timestamp of a WebVTT cue block, the current code skips everything after the start of the timestamp that is not a \t, ' ' or \n and treats what is next as the start of a WebVTT cue settings list. Yet if there is no such list, but a single \r, this will skip a part of the cue payload (namely everything until the first occurence of \t, ' ' or \n) and treat what has not been skipped as the beginning of the WebVTT cue settings list that extends until the next \r or \n (or the end). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
36fa84e7ac
commit
7447045cc0
@ -125,7 +125,7 @@ static int webvtt_read_header(AVFormatContext *s)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
/* optional cue settings */
|
/* optional cue settings */
|
||||||
p += strcspn(p, "\n\t ");
|
p += strcspn(p, "\n\r\t ");
|
||||||
while (*p == '\t' || *p == ' ')
|
while (*p == '\t' || *p == ' ')
|
||||||
p++;
|
p++;
|
||||||
settings = p;
|
settings = p;
|
||||||
|
Loading…
Reference in New Issue
Block a user