Commit 6679fcd4 authored by Clément Bœsch's avatar Clément Bœsch Committed by Clément Bœsch

avformat/assdec: allow ASS files starting with empty lines

See https://github.com/mpv-player/mpv/issues/2506
parent 7769e660
......@@ -39,6 +39,9 @@ static int ass_probe(AVProbeData *p)
FFTextReader tr;
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));
if (!memcmp(buf, "[Script Info]", 13))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment