mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavf/mpsub: remove sscanf from probing.
This should make probing faster.
This commit is contained in:
parent
905e1e4b52
commit
a82cc54fb5
@ -37,11 +37,10 @@ static int mpsub_probe(AVProbeData *p)
|
||||
const char *ptr_end = p->buf + p->buf_size;
|
||||
|
||||
while (ptr < ptr_end) {
|
||||
int n;
|
||||
|
||||
if (!memcmp(ptr, "FORMAT=TIME", 11) ||
|
||||
sscanf(ptr, "FORMAT=%d", &n) == 1)
|
||||
if (!memcmp(ptr, "FORMAT=TIME", 11))
|
||||
return AVPROBE_SCORE_EXTENSION;
|
||||
if (!memcmp(ptr, "FORMAT=", 7))
|
||||
return AVPROBE_SCORE_EXTENSION / 3;
|
||||
ptr += strcspn(ptr, "\n") + 1;
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user