Commit a8b31301 authored by Clément Bœsch's avatar Clément Bœsch

lavf/srtdec: recognize subtitles starting at event index 0.

parent c673ef12
......@@ -32,7 +32,8 @@ static int srt_probe(AVProbeData *p)
ptr += 3; /* skip UTF-8 BOM */
for (i=0; i<2; i++) {
if (num == i && sscanf(ptr, "%*d:%*2d:%*2d%*1[,.]%*3d --> %*d:%*2d:%*2d%*1[,.]%3d", &v) == 1)
if ((num == i || num + 1 == i)
&& sscanf(ptr, "%*d:%*2d:%*2d%*1[,.]%*3d --> %*d:%*2d:%*2d%*1[,.]%3d", &v) == 1)
return AVPROBE_SCORE_MAX;
num = atoi(ptr);
ptr += strcspn(ptr, "\n") + 1;
......
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