Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2014-09-04 23:16:13 +0400
committerClément Bœsch <u@pkh.me>2014-09-06 01:13:08 +0400
commitc368538667121fb20c5414dfaf0fb273035a0854 (patch)
tree8a6b16171fd2db0dd5f44ee7c17d265853fc0527 /libavformat/srtdec.c
parentb7f641dc9bff452c0af75700d1127f54dadf4247 (diff)
avformat/srtdec: speed up probing
Diffstat (limited to 'libavformat/srtdec.c')
-rw-r--r--libavformat/srtdec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/srtdec.c b/libavformat/srtdec.c
index b63d3444d3..f5f3933916 100644
--- a/libavformat/srtdec.c
+++ b/libavformat/srtdec.c
@@ -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);