mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-27 01:33:20 +00:00
jacosub_probe: speedup by making only one call to sscanf
This commit is contained in:
parent
5afdb3e6b1
commit
908293d1bc
@ -63,10 +63,13 @@ static int jacosub_probe(AVProbeData *p)
|
||||
ptr += 3; /* skip UTF-8 BOM */
|
||||
|
||||
while (ptr < ptr_end) {
|
||||
if (timed_line(ptr))
|
||||
return AVPROBE_SCORE_MAX / 2;
|
||||
while (jss_whitespace(*ptr))
|
||||
ptr++;
|
||||
if (*ptr != '#' && *ptr != '\n') {
|
||||
if (timed_line(ptr))
|
||||
return AVPROBE_SCORE_MAX / 2;
|
||||
return 0;
|
||||
}
|
||||
ptr += strcspn(ptr, "\n") + 1;
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user