mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/srtdec: speed up probing
This commit is contained in:
parent
b7f641dc9b
commit
c368538667
@ -43,6 +43,7 @@ static int srt_probe(AVProbeData *p)
|
||||
if (ff_subtitles_read_line(&tr, buf, sizeof(buf)) < 0)
|
||||
break;
|
||||
if ((num == i || num + 1 == i)
|
||||
&& buf[0] >= '0' && buf[1] <= '9' && strstr(buf, " --> ")
|
||||
&& sscanf(buf, "%*d:%*2d:%*2d%*1[,.]%*3d --> %*d:%*2d:%*2d%*1[,.]%3d", &v) == 1)
|
||||
return AVPROBE_SCORE_MAX;
|
||||
num = atoi(buf);
|
||||
|
Loading…
Reference in New Issue
Block a user