avformat/assdec: allow ASS files starting with empty lines
See https://github.com/mpv-player/mpv/issues/2506
This commit is contained in:
parent
7769e6602d
commit
6679fcd419
@ -39,6 +39,9 @@ static int ass_probe(AVProbeData *p)
|
|||||||
FFTextReader tr;
|
FFTextReader tr;
|
||||||
ff_text_init_buf(&tr, p->buf, p->buf_size);
|
ff_text_init_buf(&tr, p->buf, p->buf_size);
|
||||||
|
|
||||||
|
while (ff_text_peek_r8(&tr) == '\r' || ff_text_peek_r8(&tr) == '\n')
|
||||||
|
ff_text_r8(&tr);
|
||||||
|
|
||||||
ff_text_read(&tr, buf, sizeof(buf));
|
ff_text_read(&tr, buf, sizeof(buf));
|
||||||
|
|
||||||
if (!memcmp(buf, "[Script Info]", 13))
|
if (!memcmp(buf, "[Script Info]", 13))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user